ZennyKenny commited on
Commit
be8f9fe
Β·
verified Β·
1 Parent(s): 33c57aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -43,7 +43,8 @@ def classify_comments(categories):
43
  def visualize_output():
44
  # Ensure the required columns exist
45
  if 'comment_sentiment' not in df.columns or 'comment_category' not in df.columns:
46
- return None, None, None, "Error: Please classify comments before visualizing."
 
47
 
48
  # Pie Chart of Sentiment
49
  sentiment_counts = df['comment_sentiment'].value_counts()
 
43
  def visualize_output():
44
  # Ensure the required columns exist
45
  if 'comment_sentiment' not in df.columns or 'comment_category' not in df.columns:
46
+ # Return 5 values (None for plots and an error message for markdown)
47
+ return None, None, None, "Error: Please classify comments before visualizing.", None
48
 
49
  # Pie Chart of Sentiment
50
  sentiment_counts = df['comment_sentiment'].value_counts()