Update app.py
Browse files
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(
|
| 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 classifier("I am happy")[0]['score']
|
| 9 |
|
| 10 |
# Create a simple Gradio interface
|
| 11 |
iface = gr.Interface(fn=classify_text, inputs="text", outputs="label")
|