apratim24 commited on
Commit
b640b85
·
verified ·
1 Parent(s): d22a514

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -22,13 +22,16 @@ def sentiment_analyzer(review):
22
  return sentiment[0]['label']
23
 
24
  def sentiment_pie_chart(df):
25
- sentiment_counts = df['Sentiment'].value_counts()
26
 
27
  # Create a pie chart
28
  fig, ax = plt.subplots()
29
- sentiment_counts.plot(kind='pie', autopct='%1.1f%%', colors=['green', 'red'])
30
- ax.set_title('Review Sentiment Chart')
 
 
31
 
 
32
  return fig
33
 
34
 
 
22
  return sentiment[0]['label']
23
 
24
  def sentiment_pie_chart(df):
25
+ sentiment_counts = df['Sentiment'].value_counts()
26
 
27
  # Create a pie chart
28
  fig, ax = plt.subplots()
29
+ sentiment_counts.plot(kind='pie', autopct='%1.1f%%', colors=['green', 'red'], ax=ax)
30
+
31
+ # Remove the y-axis label
32
+ ax.set_ylabel('')
33
 
34
+ ax.set_title('Review Sentiment Chart')
35
  return fig
36
 
37