Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -131,15 +131,14 @@ def classify_sentiment(text):
|
|
| 131 |
plt.title("Sentiment Probability Distribution")
|
| 132 |
plt.ylim([0, 1])
|
| 133 |
plt.tight_layout()
|
| 134 |
-
plt.savefig("sentiment_probabilities.png")
|
| 135 |
|
| 136 |
-
return sentiment_label
|
| 137 |
|
| 138 |
# Input and output components for the interface
|
| 139 |
inputs = gr.Textbox(lines=10, label="Enter the text you want to analyze:")
|
| 140 |
outputs = [
|
| 141 |
-
gr.Textbox(label="Sentiment Prediction")
|
| 142 |
-
gr.Image(label="Sentiment Probability Distribution")
|
| 143 |
]
|
| 144 |
|
| 145 |
# Create the Gradio interface
|
|
|
|
| 131 |
plt.title("Sentiment Probability Distribution")
|
| 132 |
plt.ylim([0, 1])
|
| 133 |
plt.tight_layout()
|
| 134 |
+
# plt.savefig("sentiment_probabilities.png")
|
| 135 |
|
| 136 |
+
return sentiment_label #, "sentiment_probabilities.png"
|
| 137 |
|
| 138 |
# Input and output components for the interface
|
| 139 |
inputs = gr.Textbox(lines=10, label="Enter the text you want to analyze:")
|
| 140 |
outputs = [
|
| 141 |
+
gr.Textbox(label="Sentiment Prediction")
|
|
|
|
| 142 |
]
|
| 143 |
|
| 144 |
# Create the Gradio interface
|