b22ee075 commited on
Commit
eb0b05c
·
verified ·
1 Parent(s): fde5c91

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
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, "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
- 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