Spaces:
Runtime error
Runtime error
Aryanikale23
commited on
Commit
•
ac3c4de
1
Parent(s):
50320c0
Update app.py
Browse files
app.py
CHANGED
@@ -108,11 +108,11 @@ def infer(video_file):
|
|
108 |
logits = outputs.logits
|
109 |
softmax_scores = torch.nn.functional.softmax(logits, dim=-1).squeeze(0)
|
110 |
confidences = {LABELS[i]: float(softmax_scores[i]) for i in range(len(LABELS))}
|
111 |
-
return confidences
|
112 |
|
113 |
gr.Interface(
|
114 |
fn=infer,
|
115 |
-
inputs=gr.Video(
|
116 |
outputs=gr.Label(num_top_classes=3),
|
117 |
title="VideoMAE fine-tuned on a subset of UCF-101",
|
118 |
description=(
|
|
|
108 |
logits = outputs.logits
|
109 |
softmax_scores = torch.nn.functional.softmax(logits, dim=-1).squeeze(0)
|
110 |
confidences = {LABELS[i]: float(softmax_scores[i]) for i in range(len(LABELS))}
|
111 |
+
return {confidences}
|
112 |
|
113 |
gr.Interface(
|
114 |
fn=infer,
|
115 |
+
inputs=gr.Video(),
|
116 |
outputs=gr.Label(num_top_classes=3),
|
117 |
title="VideoMAE fine-tuned on a subset of UCF-101",
|
118 |
description=(
|