Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,9 +30,9 @@ def inference(input_text):
|
|
| 30 |
predicted_class_id = logits.argmax().item()
|
| 31 |
output = model.config.id2label[predicted_class_id]
|
| 32 |
ans = "积极"
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
return
|
| 36 |
|
| 37 |
demo = gr.Interface(
|
| 38 |
fn=inference,
|
|
|
|
| 30 |
predicted_class_id = logits.argmax().item()
|
| 31 |
output = model.config.id2label[predicted_class_id]
|
| 32 |
ans = "积极"
|
| 33 |
+
if output == "0":
|
| 34 |
+
ans = "消极"
|
| 35 |
+
return ans
|
| 36 |
|
| 37 |
demo = gr.Interface(
|
| 38 |
fn=inference,
|