Antonio
commited on
Commit
·
d50fcbf
1
Parent(s):
4779bd2
Added functionality to display the video
Browse files
app.py
CHANGED
|
@@ -217,17 +217,21 @@ def predict(video_file, video_model_name, audio_model_name, framework_name):
|
|
| 217 |
return {
|
| 218 |
"Video Label": highest_video_emotion,
|
| 219 |
"Audio Label": highest_audio_emotion,
|
| 220 |
-
"Consensus Label": consensus_label
|
|
|
|
| 221 |
}
|
| 222 |
|
| 223 |
inputs = [
|
| 224 |
-
gr.
|
| 225 |
gr.Dropdown(["60% Accuracy", "80% Accuracy"], label="Select Video Model"),
|
| 226 |
gr.Dropdown(["60% Accuracy"], label="Select Audio Model"),
|
| 227 |
gr.Dropdown(list(decision_frameworks.keys()), label="Select Decision Framework")
|
| 228 |
]
|
| 229 |
|
| 230 |
-
outputs =
|
|
|
|
|
|
|
|
|
|
| 231 |
|
| 232 |
iface = gr.Interface(
|
| 233 |
fn=predict,
|
|
|
|
| 217 |
return {
|
| 218 |
"Video Label": highest_video_emotion,
|
| 219 |
"Audio Label": highest_audio_emotion,
|
| 220 |
+
"Consensus Label": consensus_label,
|
| 221 |
+
"Video Path": video_file.name
|
| 222 |
}
|
| 223 |
|
| 224 |
inputs = [
|
| 225 |
+
gr.Video(label="Upload Video"),
|
| 226 |
gr.Dropdown(["60% Accuracy", "80% Accuracy"], label="Select Video Model"),
|
| 227 |
gr.Dropdown(["60% Accuracy"], label="Select Audio Model"),
|
| 228 |
gr.Dropdown(list(decision_frameworks.keys()), label="Select Decision Framework")
|
| 229 |
]
|
| 230 |
|
| 231 |
+
outputs = [
|
| 232 |
+
gr.JSON(label="Predictions"),
|
| 233 |
+
gr.Video(label="Uploaded Video")
|
| 234 |
+
]
|
| 235 |
|
| 236 |
iface = gr.Interface(
|
| 237 |
fn=predict,
|