Spaces:
Running
Running
kovacsvi
commited on
Commit
·
2b41a25
1
Parent(s):
43f3adb
default values for all dropdowns
Browse files- interfaces/cap.py +1 -1
- interfaces/cap_media_demo.py +3 -3
- interfaces/cap_minor.py +2 -2
- interfaces/cap_minor_media.py +2 -2
- interfaces/emotion.py +2 -2
- interfaces/emotion9.py +2 -2
- interfaces/illframes.py +2 -2
- interfaces/manifesto.py +1 -1
- interfaces/ner.py +1 -1
- interfaces/ontolisst.py +1 -1
- interfaces/sentiment.py +2 -2
interfaces/cap.py
CHANGED
@@ -121,5 +121,5 @@ demo = gr.Interface(
|
|
121 |
fn=predict_cap,
|
122 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
123 |
gr.Dropdown(languages, label="Language", value=languages[-1]),
|
124 |
-
gr.Dropdown(domains.keys(), label="Domain", value=list(domains.
|
125 |
outputs=[gr.Label(num_top_classes=5, label="Output"), gr.Markdown()])
|
|
|
121 |
fn=predict_cap,
|
122 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
123 |
gr.Dropdown(languages, label="Language", value=languages[-1]),
|
124 |
+
gr.Dropdown(domains.keys(), label="Domain", value=list(domains.keys())[0])],
|
125 |
outputs=[gr.Label(num_top_classes=5, label="Output"), gr.Markdown()])
|
interfaces/cap_media_demo.py
CHANGED
@@ -68,6 +68,6 @@ demo = gr.Interface(
|
|
68 |
title="CAP Media Topics Babel Demo",
|
69 |
fn=predict_cap,
|
70 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
71 |
-
gr.Dropdown(languages, label="Language"),
|
72 |
-
gr.Dropdown(domains.keys(), label="Domain")],
|
73 |
-
outputs=[gr.Label(num_top_classes=5, label="Output"), gr.Markdown()])
|
|
|
68 |
title="CAP Media Topics Babel Demo",
|
69 |
fn=predict_cap,
|
70 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
71 |
+
gr.Dropdown(languages, label="Language", value=languages[0]),
|
72 |
+
gr.Dropdown(domains.keys(), label="Domain", value=domains[0])],
|
73 |
+
outputs=[gr.Label(num_top_classes=5, label="Output"), gr.Markdown()])
|
interfaces/cap_minor.py
CHANGED
@@ -133,6 +133,6 @@ demo = gr.Interface(
|
|
133 |
title="CAP Minor Topics Babel Demo",
|
134 |
fn=predict_cap,
|
135 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
136 |
-
gr.Dropdown(languages, label="Language"),
|
137 |
-
gr.Dropdown(domains.keys(), label="Domain")],
|
138 |
outputs=[gr.HTML(label="Output"), gr.Markdown()])
|
|
|
133 |
title="CAP Minor Topics Babel Demo",
|
134 |
fn=predict_cap,
|
135 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
136 |
+
gr.Dropdown(languages, label="Language", value=languages[0]),
|
137 |
+
gr.Dropdown(domains.keys(), label="Domain", value=list(domains.keys())[0]))],
|
138 |
outputs=[gr.HTML(label="Output"), gr.Markdown()])
|
interfaces/cap_minor_media.py
CHANGED
@@ -232,6 +232,6 @@ demo = gr.Interface(
|
|
232 |
value="Hierarchical Classification"
|
233 |
),
|
234 |
gr.Textbox(lines=6, label="Input"),
|
235 |
-
gr.Dropdown(languages, label="Language"),
|
236 |
-
gr.Dropdown(domains.keys(), label="Domain")],
|
237 |
outputs=[gr.Markdown(), gr.Label(label="Output"), gr.Markdown()])
|
|
|
232 |
value="Hierarchical Classification"
|
233 |
),
|
234 |
gr.Textbox(lines=6, label="Input"),
|
235 |
+
gr.Dropdown(languages, label="Language", value=languages[0]),
|
236 |
+
gr.Dropdown(domains.keys(), label="Domain", value=domains[0])],
|
237 |
outputs=[gr.Markdown(), gr.Label(label="Output"), gr.Markdown()])
|
interfaces/emotion.py
CHANGED
@@ -60,6 +60,6 @@ demo = gr.Interface(
|
|
60 |
title="Emotions (6) Babel Demo",
|
61 |
fn=predict_cap,
|
62 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
63 |
-
gr.Dropdown(languages, label="Language"),
|
64 |
-
gr.Dropdown(domains.keys(), label="Domain")],
|
65 |
outputs=[gr.Label(num_top_classes=5, label="Output"), gr.Markdown()])
|
|
|
60 |
title="Emotions (6) Babel Demo",
|
61 |
fn=predict_cap,
|
62 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
63 |
+
gr.Dropdown(languages, label="Language", value=languages[1]),
|
64 |
+
gr.Dropdown(domains.keys(), label="Domain", value=list(domains.keys())[0])],
|
65 |
outputs=[gr.Label(num_top_classes=5, label="Output"), gr.Markdown()])
|
interfaces/emotion9.py
CHANGED
@@ -60,6 +60,6 @@ demo = gr.Interface(
|
|
60 |
title="Emotions (9) Babel Demo",
|
61 |
fn=predict_e6,
|
62 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
63 |
-
gr.Dropdown(languages, label="Language"),
|
64 |
-
gr.Dropdown(domains.keys(), label="Domain")],
|
65 |
outputs=[gr.Label(num_top_classes=5, label="Output"), gr.Markdown()])
|
|
|
60 |
title="Emotions (9) Babel Demo",
|
61 |
fn=predict_e6,
|
62 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
63 |
+
gr.Dropdown(languages, label="Language", value=languages[1]),
|
64 |
+
gr.Dropdown(domains.keys(), label="Domain", value=list(domains.keys())[0])],
|
65 |
outputs=[gr.Label(num_top_classes=5, label="Output"), gr.Markdown()])
|
interfaces/illframes.py
CHANGED
@@ -111,6 +111,6 @@ demo = gr.Interface(
|
|
111 |
title="ILLFRAMES Babel Demo",
|
112 |
fn=predict_illframes,
|
113 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
114 |
-
gr.Dropdown(languages, label="Language"),
|
115 |
-
gr.Dropdown(domains.keys(), label="Domain")],
|
116 |
outputs=[gr.Label(num_top_classes=5, label="Output"), gr.Markdown()])
|
|
|
111 |
title="ILLFRAMES Babel Demo",
|
112 |
fn=predict_illframes,
|
113 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
114 |
+
gr.Dropdown(languages, label="Language", value=languages[0]),
|
115 |
+
gr.Dropdown(domains.keys(), label="Domain", value=list(domains.keys())[0])],
|
116 |
outputs=[gr.Label(num_top_classes=5, label="Output"), gr.Markdown()])
|
interfaces/manifesto.py
CHANGED
@@ -58,5 +58,5 @@ demo = gr.Interface(
|
|
58 |
title="Manifesto Babel Demo",
|
59 |
fn=predict_cap,
|
60 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
61 |
-
gr.Dropdown(languages, label="Language")],
|
62 |
outputs=[gr.Label(num_top_classes=5, label="Output"), gr.Markdown()])
|
|
|
58 |
title="Manifesto Babel Demo",
|
59 |
fn=predict_cap,
|
60 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
61 |
+
gr.Dropdown(languages, label="Language", value=languages[6])],
|
62 |
outputs=[gr.Label(num_top_classes=5, label="Output"), gr.Markdown()])
|
interfaces/ner.py
CHANGED
@@ -47,5 +47,5 @@ demo = gr.Interface(
|
|
47 |
title="NER Babel Demo",
|
48 |
fn=named_entity_recognition,
|
49 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
50 |
-
gr.Dropdown(languages, label="Language")],
|
51 |
outputs=[gr.HighlightedText(label='Output'), gr.Markdown()])
|
|
|
47 |
title="NER Babel Demo",
|
48 |
fn=named_entity_recognition,
|
49 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
50 |
+
gr.Dropdown(languages, label="Language", value=languages[0])],
|
51 |
outputs=[gr.HighlightedText(label='Output'), gr.Markdown()])
|
interfaces/ontolisst.py
CHANGED
@@ -92,5 +92,5 @@ demo = gr.Interface(
|
|
92 |
title="ONTOLISST Babel Demo",
|
93 |
fn=predict_cap,
|
94 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
95 |
-
gr.Dropdown(languages, label="Language")],
|
96 |
outputs=[gr.Label(num_top_classes=3, label="Output"), gr.Markdown()])
|
|
|
92 |
title="ONTOLISST Babel Demo",
|
93 |
fn=predict_cap,
|
94 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
95 |
+
gr.Dropdown(languages, label="Language", value=languages[0])],
|
96 |
outputs=[gr.Label(num_top_classes=3, label="Output"), gr.Markdown()])
|
interfaces/sentiment.py
CHANGED
@@ -69,6 +69,6 @@ demo = gr.Interface(
|
|
69 |
title="Sentiment (3) Babel Demo",
|
70 |
fn=predict_cap,
|
71 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
72 |
-
gr.Dropdown(languages, label="Language"),
|
73 |
-
gr.Dropdown(domains.keys(), label="Domain")],
|
74 |
outputs=[gr.Label(num_top_classes=3, label="Output"), gr.Markdown()])
|
|
|
69 |
title="Sentiment (3) Babel Demo",
|
70 |
fn=predict_cap,
|
71 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
72 |
+
gr.Dropdown(languages, label="Language", value=languages[1]),
|
73 |
+
gr.Dropdown(domains.keys(), label="Domain", value=list(domains.keys())[0])],
|
74 |
outputs=[gr.Label(num_top_classes=3, label="Output"), gr.Markdown()])
|