minhdang commited on
Commit
a8b9f1d
1 Parent(s): 781e3d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -27
app.py CHANGED
@@ -146,34 +146,34 @@ def inference_image(img):
146
  return {imagenet_id_to_classname[str(i)]: float(prediction[i]) for i in range(1000)}
147
 
148
 
149
- # demo = gr.Interface(
150
- # fn = ultra_inference_video,
151
- # inputs = "numpy",
152
- # outputs = "label",
153
 
154
- # )
155
- demo = gr.Blocks()
156
- with demo:
157
- gr.Markdown(
158
- """
159
- # VideoMamba-Ti
160
- Gradio demo for <a href='https://github.com/OpenGVLab/VideoMamba' target='_blank'>VideoMamba</a>: To use it, simply upload your video, or click one of the examples to load them. Read more at the links below.
161
- """
162
- )
163
-
164
- # with gr.Tab("Video"):
165
- # # with gr.Box():
166
- with gr.Row():
167
- with gr.Column():
168
- with gr.Row():
169
- input_video = gr.Video(label='Input Video', height=360)
170
- # input_video = load_video(input_video)
171
- with gr.Row():
172
- submit_video_button = gr.Button('Submit')
173
- with gr.Column():
174
- label_video = gr.Label(num_top_classes=5)
175
- with gr.Row():
176
- gr.Examples(examples=['./videos/hitting_baseball.mp4', './videos/hoverboarding.mp4', './videos/yoga.mp4'], inputs=input_video, outputs=label_video, fn=inference_video, cache_examples=True)
177
 
178
  # # with gr.Tab("Image"):
179
  # # # with gr.Box():
 
146
  return {imagenet_id_to_classname[str(i)]: float(prediction[i]) for i in range(1000)}
147
 
148
 
149
+ demo = gr.Interface(
150
+ fn = ultra_inference_video,
151
+ inputs = "sketchpad",
152
+ outputs = "label",
153
 
154
+ )
155
+ # demo = gr.Blocks()
156
+ # with demo:
157
+ # gr.Markdown(
158
+ # """
159
+ # # VideoMamba-Ti
160
+ # Gradio demo for <a href='https://github.com/OpenGVLab/VideoMamba' target='_blank'>VideoMamba</a>: To use it, simply upload your video, or click one of the examples to load them. Read more at the links below.
161
+ # """
162
+ # )
163
+
164
+ # # with gr.Tab("Video"):
165
+ # # # with gr.Box():
166
+ # with gr.Row():
167
+ # with gr.Column():
168
+ # with gr.Row():
169
+ # input_video = gr.Video(label='Input Video', height=360)
170
+ # # input_video = load_video(input_video)
171
+ # with gr.Row():
172
+ # submit_video_button = gr.Button('Submit')
173
+ # with gr.Column():
174
+ # label_video = gr.Label(num_top_classes=5)
175
+ # with gr.Row():
176
+ # gr.Examples(examples=['./videos/hitting_baseball.mp4', './videos/hoverboarding.mp4', './videos/yoga.mp4'], inputs=input_video, outputs=label_video, fn=inference_video, cache_examples=True)
177
 
178
  # # with gr.Tab("Image"):
179
  # # # with gr.Box():