Spaces:
Sleeping
Sleeping
Souha Ben Hassine
commited on
Commit
·
8d2a8d3
1
Parent(s):
acf601d
changed video size
Browse files
app.py
CHANGED
@@ -168,6 +168,8 @@ def predict_risk(video_index):
|
|
168 |
prediction = predict_video(model, video_path, text_input, tokenizer, transform)
|
169 |
|
170 |
# Return the corresponding label
|
|
|
|
|
171 |
return "Risky Health Behavior" if prediction == 1 else "Not Risky Health Behavior"
|
172 |
|
173 |
# Interface setup
|
|
|
168 |
prediction = predict_video(model, video_path, text_input, tokenizer, transform)
|
169 |
|
170 |
# Return the corresponding label
|
171 |
+
if prediction == "Error during prediction":
|
172 |
+
return "Error during prediction"
|
173 |
return "Risky Health Behavior" if prediction == 1 else "Not Risky Health Behavior"
|
174 |
|
175 |
# Interface setup
|