Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ def analyze_text(text):
|
|
| 6 |
return "Please enter some text.", ""
|
| 7 |
|
| 8 |
label, score = predict(text)
|
| 9 |
-
return f"Prediction: {label}", f"Confidence Score: {score*
|
| 10 |
|
| 11 |
# Gradio UI
|
| 12 |
with gr.Blocks(title="txtemo - Emotion & Sentiment Detector") as demo:
|
|
|
|
| 6 |
return "Please enter some text.", ""
|
| 7 |
|
| 8 |
label, score = predict(text)
|
| 9 |
+
return f"Prediction: {label}", f"Confidence Score: {score*100:.2f}"
|
| 10 |
|
| 11 |
# Gradio UI
|
| 12 |
with gr.Blocks(title="txtemo - Emotion & Sentiment Detector") as demo:
|