monikahung commited on
Commit
027a5b0
·
1 Parent(s): 5693a6c

Update Key Validation

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -139,13 +139,13 @@ def validate_video_with_git(video_path, mission_type):
139
  return "Gagal. Gagal memproses video."
140
 
141
  if mission_type == 'paper':
142
- required_keywords = ['person', 'paper', 'yellow trash can']
143
  elif mission_type == 'leaf':
144
- required_keywords = ['person', 'leaves', 'green trash can']
145
  elif mission_type == 'plastic_bottle':
146
- required_keywords = ['person', 'bottle of water', 'yellow trash can']
147
  elif mission_type == 'drink_cans':
148
- required_keywords = ['person', 'drink cans', 'yellow trash can']
149
  else:
150
  upload_video_to_dataset(video_path, "neither", mission_type, "gagal")
151
  return "Gagal. Tipe misi tidak valid."
 
139
  return "Gagal. Gagal memproses video."
140
 
141
  if mission_type == 'paper':
142
+ required_keywords = ['hand', 'paper', 'yellow trash can']
143
  elif mission_type == 'leaf':
144
+ required_keywords = ['hand', 'leaf', 'green trash can']
145
  elif mission_type == 'plastic_bottle':
146
+ required_keywords = ['hand', 'plastic bottle', 'yellow trash can']
147
  elif mission_type == 'drink_cans':
148
+ required_keywords = ['hand', 'can', 'yellow trash can']
149
  else:
150
  upload_video_to_dataset(video_path, "neither", mission_type, "gagal")
151
  return "Gagal. Tipe misi tidak valid."