Spaces:
vztu
/
Runtime error

vztu commited on
Commit
68d1a9d
·
verified ·
1 Parent(s): 8e01aab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -201,16 +201,19 @@ def inference_one_video(input_video):
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.JSON(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)
 
201
  ]
202
 
203
  image_path = create_bar_chart(normalized_scores, comparisons)
204
+ return image_path, pred_score["semantic"], pred_score["technical"], pred_score["aesthetic"], pred_score["overall"]
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_score_1 = gr.Textbox(label="Semantic")
210
+ output_score_2 = gr.Textbox(label="Technical")
211
+ output_score_3 = gr.Textbox(label="Aesthetic")
212
+ output_score_4 = gr.Textbox(label="Overall Quality")
213
 
214
  # Create the Gradio interface
215
  gradio_app = gr.Interface(fn=inference_one_video, inputs=video_input, outputs=[
216
+ output_image, output_score_1, output_score_2, output_score_3, output_score_4])
217
 
218
  if __name__ == "__main__":
219
  gradio_app.launch(share=True)