Spaces:
Running
Running
Commit
·
767781f
1
Parent(s):
84d8036
Update app.py
Browse files
app.py
CHANGED
@@ -119,7 +119,7 @@ def inference_sentence(text):
|
|
119 |
logits = model(**inputs).logits
|
120 |
predicted_class_id = logits.argmax().item()
|
121 |
output = model.config.id2label[predicted_class_id]
|
122 |
-
return output
|
123 |
"""
|
124 |
def inference_sentence(text):
|
125 |
output = "This sentence will be processed:\n" + text
|
@@ -371,6 +371,7 @@ with gr.Blocks() as demo:
|
|
371 |
with gr.Column():
|
372 |
input = gr.Textbox(
|
373 |
label="Enter a sentence",
|
|
|
374 |
lines=1)
|
375 |
send_btn = gr.Button("Send")
|
376 |
output = gr.Textbox()
|
|
|
119 |
logits = model(**inputs).logits
|
120 |
predicted_class_id = logits.argmax().item()
|
121 |
output = model.config.id2label[predicted_class_id]
|
122 |
+
return "Predicted emotion:\n" + output
|
123 |
"""
|
124 |
def inference_sentence(text):
|
125 |
output = "This sentence will be processed:\n" + text
|
|
|
371 |
with gr.Column():
|
372 |
input = gr.Textbox(
|
373 |
label="Enter a sentence",
|
374 |
+
value="Jaaah🙂volgende vakantie Barcelona en na het zomerseizoen naar de Algarve",
|
375 |
lines=1)
|
376 |
send_btn = gr.Button("Send")
|
377 |
output = gr.Textbox()
|