Dhana2403 commited on
Commit
39bfcde
·
verified ·
1 Parent(s): bbbb940

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -6,7 +6,10 @@ sentiment_analyzer = pipeline('sentiment-analysis')
6
 
7
  # Define the function for sentiment analysis
8
  def analyze_sentiment(text):
9
- return sentiment_analyzer(text)
 
 
 
10
 
11
  # Set up the Gradio interface
12
  interface = gr.Interface(fn=analyze_sentiment, inputs="text", outputs="json")
 
6
 
7
  # Define the function for sentiment analysis
8
  def analyze_sentiment(text):
9
+ # Test the result here first before returning
10
+ result = sentiment_analyzer(text)
11
+ print(result) # Check the output format in the terminal
12
+ return result
13
 
14
  # Set up the Gradio interface
15
  interface = gr.Interface(fn=analyze_sentiment, inputs="text", outputs="json")