Update app.py
Browse files
app.py
CHANGED
|
@@ -127,13 +127,13 @@ def predict_all(text):
|
|
| 127 |
)
|
| 128 |
|
| 129 |
def clear_all():
|
| 130 |
-
return "", "", "", "", ""
|
| 131 |
|
| 132 |
with gr.Blocks() as demo:
|
| 133 |
gr.Markdown(
|
| 134 |
"""
|
| 135 |
<h1 style="text-align: center; font-size: 48px; margin-bottom: 5px;">Analiza sentimenta</h1>
|
| 136 |
-
<p style="text-align: center; font-size: 16px; margin-top: 0;">Predikcije koriste SVM, CNN, GRU i
|
| 137 |
""",
|
| 138 |
elem_id="naslov"
|
| 139 |
)
|
|
@@ -155,7 +155,7 @@ with gr.Blocks() as demo:
|
|
| 155 |
with gr.Column():
|
| 156 |
gr.Markdown("### Transformers")
|
| 157 |
bert_output = gr.Textbox(label="BERTić")
|
| 158 |
-
croslo_output = gr.Textbox(label="CroSlo BERT")
|
| 159 |
|
| 160 |
submit_btn.click(fn=predict_all, inputs=input_text, outputs=[svm_output, cnn_output, gru_output, bert_output, croslo_output])
|
| 161 |
clear_btn.click(fn=clear_all, inputs=None, outputs=[input_text, svm_output, cnn_output, gru_output, bert_output, croslo_output])
|
|
|
|
| 127 |
)
|
| 128 |
|
| 129 |
def clear_all():
|
| 130 |
+
return "", "", "", "", "", ""
|
| 131 |
|
| 132 |
with gr.Blocks() as demo:
|
| 133 |
gr.Markdown(
|
| 134 |
"""
|
| 135 |
<h1 style="text-align: center; font-size: 48px; margin-bottom: 5px;">Analiza sentimenta</h1>
|
| 136 |
+
<p style="text-align: center; font-size: 16px; margin-top: 0;">Predikcije koriste SVM, CNN, GRU, BERTić i CroSlo modele.</p>
|
| 137 |
""",
|
| 138 |
elem_id="naslov"
|
| 139 |
)
|
|
|
|
| 155 |
with gr.Column():
|
| 156 |
gr.Markdown("### Transformers")
|
| 157 |
bert_output = gr.Textbox(label="BERTić")
|
| 158 |
+
croslo_output = gr.Textbox(label="CroSlo BERT")
|
| 159 |
|
| 160 |
submit_btn.click(fn=predict_all, inputs=input_text, outputs=[svm_output, cnn_output, gru_output, bert_output, croslo_output])
|
| 161 |
clear_btn.click(fn=clear_all, inputs=None, outputs=[input_text, svm_output, cnn_output, gru_output, bert_output, croslo_output])
|