Spaces:
Running
Running
add css
Browse files- interfaces/cap_minor.py +4 -1
interfaces/cap_minor.py
CHANGED
@@ -86,10 +86,13 @@ def predict_cap(text, language, domain):
|
|
86 |
|
87 |
return predict(text, model_id, tokenizer_id)
|
88 |
|
|
|
|
|
|
|
89 |
demo = gr.Interface(
|
90 |
title="CAP Minor Topics Babel Demo",
|
91 |
fn=predict_cap,
|
92 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
93 |
gr.Dropdown(languages, label="Language"),
|
94 |
gr.Dropdown(domains.keys(), label="Domain")],
|
95 |
-
outputs=[gr.Label(num_top_classes=5, label="Output",
|
|
|
86 |
|
87 |
return predict(text, model_id, tokenizer_id)
|
88 |
|
89 |
+
css = '''
|
90 |
+
.info {text-align: center; font-size: 3em; !important}
|
91 |
+
'''
|
92 |
demo = gr.Interface(
|
93 |
title="CAP Minor Topics Babel Demo",
|
94 |
fn=predict_cap,
|
95 |
inputs=[gr.Textbox(lines=6, label="Input"),
|
96 |
gr.Dropdown(languages, label="Language"),
|
97 |
gr.Dropdown(domains.keys(), label="Domain")],
|
98 |
+
outputs=[gr.Label(num_top_classes=5, label="Output", elem_classes="info"), gr.Markdown()])
|