Spaces:
Build error
Build error
pablorodriper
commited on
Commit
·
4e2bdb8
1
Parent(s):
3cc809a
Upload app.py
Browse files
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.
|
19 |
-
with gr.
|
20 |
-
with gr.
|
21 |
-
|
22 |
-
|
23 |
-
output_label = gr.Label(label="Model Output", show_label=True)
|
24 |
|
25 |
-
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
|
31 |
-
|
32 |
-
|
33 |
|
34 |
-
|
35 |
-
|
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 |
|