curryaNa commited on
Commit
3a589ad
·
verified ·
1 Parent(s): 78f42fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -29,10 +29,10 @@ def inference(input_text):
29
 
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,
 
29
 
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 output
36
 
37
  demo = gr.Interface(
38
  fn=inference,