kirill
commited on
Commit
·
01ab6e1
1
Parent(s):
2051a9f
Fixed tabs
Browse files- app.py +4 -8
- image_captioning.py +1 -1
- visual_qa.py +1 -1
- zero_shot_classification.py +1 -1
app.py
CHANGED
@@ -5,14 +5,10 @@ from zero_shot_classification import get_zero_shot_classification_tab
|
|
5 |
|
6 |
|
7 |
with gr.Blocks() as app:
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
gr.TabbedInterface(
|
13 |
-
[image_captioning_tab, visual_qa_tab, zero_shot_classification_tab],
|
14 |
-
["Image Captioning", "Visual Q&A", "Zero-Shot Classification"]
|
15 |
-
)
|
16 |
|
17 |
|
18 |
app.launch()
|
|
|
5 |
|
6 |
|
7 |
with gr.Blocks() as app:
|
8 |
+
with gr.Tabs():
|
9 |
+
get_image_captioning_tab()
|
10 |
+
get_visual_qa_tab()
|
11 |
+
get_zero_shot_classification_tab()
|
|
|
|
|
|
|
|
|
12 |
|
13 |
|
14 |
app.launch()
|
image_captioning.py
CHANGED
@@ -28,7 +28,7 @@ def get_image_captioning_tab():
|
|
28 |
|
29 |
return [result, time_spent]
|
30 |
|
31 |
-
with gr.
|
32 |
gr.Markdown("# Image Captioning")
|
33 |
|
34 |
with gr.Row():
|
|
|
28 |
|
29 |
return [result, time_spent]
|
30 |
|
31 |
+
with gr.TabItem("Image Captioning") as image_captioning_tab:
|
32 |
gr.Markdown("# Image Captioning")
|
33 |
|
34 |
with gr.Row():
|
visual_qa.py
CHANGED
@@ -25,7 +25,7 @@ def get_visual_qa_tab():
|
|
25 |
|
26 |
return [result, time_spent]
|
27 |
|
28 |
-
with gr.
|
29 |
gr.Markdown("# Visual Question & Answering")
|
30 |
|
31 |
with gr.Row():
|
|
|
25 |
|
26 |
return [result, time_spent]
|
27 |
|
28 |
+
with gr.TabItem("Visual Q&A") as visual_qa_tab:
|
29 |
gr.Markdown("# Visual Question & Answering")
|
30 |
|
31 |
with gr.Row():
|
zero_shot_classification.py
CHANGED
@@ -35,7 +35,7 @@ def get_zero_shot_classification_tab():
|
|
35 |
|
36 |
return [result, time_spent]
|
37 |
|
38 |
-
with gr.
|
39 |
gr.Markdown("# Zero-Shot Image Classification")
|
40 |
|
41 |
with gr.Row():
|
|
|
35 |
|
36 |
return [result, time_spent]
|
37 |
|
38 |
+
with gr.TabItem("Zero-Shot Classification") as zero_shot_image_classification_tab:
|
39 |
gr.Markdown("# Zero-Shot Image Classification")
|
40 |
|
41 |
with gr.Row():
|