Emanai commited on
Commit
f7e4f03
·
verified ·
1 Parent(s): df6f818

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -5,7 +5,7 @@ from transformers import pipeline
5
  classifier = pipeline("text-classification", model="Emanai/my-finetuned-bert2")
6
 
7
  def classify_text(text):
8
- return classifier("I am happy")[0]['score']
9
 
10
  # Create a simple Gradio interface
11
  iface = gr.Interface(fn=classify_text, inputs="text", outputs="label")
 
5
  classifier = pipeline("text-classification", model="Emanai/my-finetuned-bert2")
6
 
7
  def classify_text(text):
8
+ return '{} - {}'.format(classifier("I am very sad")[0]['score'], classifier("I am happy")[0]['label'])
9
 
10
  # Create a simple Gradio interface
11
  iface = gr.Interface(fn=classify_text, inputs="text", outputs="label")