tfshi commited on
Commit
a0870ec
1 Parent(s): bd82413

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -30,7 +30,7 @@ def inference(input_text):
30
  logits = model(**inputs).logits
31
 
32
  predicted_class_id = logits.argmax().item()
33
- output = model.config.label2id[predicted_class_id]
34
  return output
35
 
36
  demo = gr.Interface(
 
30
  logits = model(**inputs).logits
31
 
32
  predicted_class_id = logits.argmax().item()
33
+ output = model.config.id2label[predicted_class_id]
34
  return output
35
 
36
  demo = gr.Interface(