tomp61 commited on
Commit
11f13f2
·
verified ·
1 Parent(s): c29ec05

Update app.py

Browse files

Fixed analyze_text() function to return list of values, rather than a dict.

Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -15,12 +15,12 @@ def analyze_text(text):
15
 
16
  avg_word_length = char_count / word_count
17
 
18
- return {
19
- "sentiment_score": round(sentiment, 2),
20
- "word_count": word_count,
21
- "char_count": char_count,
22
- "avg_word_length": round(avg_word_length, 2)
23
- }
24
 
25
  with gr.Blocks() as demo:
26
  gr.Markdown("# Text Analysis App")
 
15
 
16
  avg_word_length = char_count / word_count
17
 
18
+ return [
19
+ round(sentiment, 2),
20
+ word_count,
21
+ char_count,
22
+ round(avg_word_length, 2),
23
+ ]
24
 
25
  with gr.Blocks() as demo:
26
  gr.Markdown("# Text Analysis App")