pablorodriper commited on
Commit
4e2bdb8
·
1 Parent(s): 3cc809a

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -14
app.py CHANGED
@@ -15,24 +15,23 @@ demo = gr.Blocks()
15
  with demo:
16
  gr.Markdown("# **<p align='center'>Video Vision Transformer on medmnist</p>**")
17
 
18
- with gr.Tabs():
19
- with gr.TabItem("Upload & Predict"):
20
- with gr.Box():
21
- with gr.Row():
22
- input_video = gr.Video(label="Input Video", show_label=True)
23
- output_label = gr.Label(label="Model Output", show_label=True)
24
 
25
- gr.Markdown("**Predict**")
26
 
27
- with gr.Box():
28
- with gr.Row():
29
- submit_button = gr.Button("Submit")
30
 
31
- gr.Markdown("Examples")
32
- gr.Markdown("The model is trained to classify videos belonging to the following classes: liver, kidney-right, kidney-left, femur-right, femur-left, bladder, heart, lung-right, lung-left, spleen, pancreas")
33
 
34
- with gr.Column():
35
- gr.Examples(example_list, [input_video], [output_label], predict_label, cache_examples=True)
36
 
37
  submit_button.click(predict_label, inputs=input_video, outputs=output_label)
38
 
 
15
  with demo:
16
  gr.Markdown("# **<p align='center'>Video Vision Transformer on medmnist</p>**")
17
 
18
+ with gr.Tab("Upload & Predict"):
19
+ with gr.Box():
20
+ with gr.Row():
21
+ input_video = gr.Video(label="Input Video", show_label=True)
22
+ output_label = gr.Label(label="Model Output", show_label=True)
 
23
 
24
+ gr.Markdown("**Predict**")
25
 
26
+ with gr.Box():
27
+ with gr.Row():
28
+ submit_button = gr.Button("Submit")
29
 
30
+ gr.Markdown("Examples")
31
+ gr.Markdown("The model is trained to classify videos belonging to the following classes: liver, kidney-right, kidney-left, femur-right, femur-left, bladder, heart, lung-right, lung-left, spleen, pancreas")
32
 
33
+ with gr.Column():
34
+ gr.Examples(example_list, [input_video], [output_label], predict_label, cache_examples=True)
35
 
36
  submit_button.click(predict_label, inputs=input_video, outputs=output_label)
37