Update app.py
Browse files
app.py
CHANGED
@@ -201,14 +201,16 @@ def inference_one_video(input_video):
|
|
201 |
]
|
202 |
|
203 |
image_path = create_bar_chart(normalized_scores, comparisons)
|
204 |
-
return image_path
|
205 |
|
206 |
# Define the input and output types for Gradio using the new API
|
207 |
video_input = gr.Video(label="Input Video")
|
208 |
output_image = gr.Image(label="Scores")
|
|
|
209 |
|
210 |
# Create the Gradio interface
|
211 |
-
gradio_app = gr.Interface(fn=inference_one_video, inputs=video_input, outputs=
|
|
|
212 |
|
213 |
if __name__ == "__main__":
|
214 |
gradio_app.launch(share=True)
|
|
|
201 |
]
|
202 |
|
203 |
image_path = create_bar_chart(normalized_scores, comparisons)
|
204 |
+
return image_path, pred_score
|
205 |
|
206 |
# Define the input and output types for Gradio using the new API
|
207 |
video_input = gr.Video(label="Input Video")
|
208 |
output_image = gr.Image(label="Scores")
|
209 |
+
output_scores = gr.Textbox(label="Scores")
|
210 |
|
211 |
# Create the Gradio interface
|
212 |
+
gradio_app = gr.Interface(fn=inference_one_video, inputs=video_input, outputs=[
|
213 |
+
output_image, output_scores])
|
214 |
|
215 |
if __name__ == "__main__":
|
216 |
gradio_app.launch(share=True)
|