Spaces:
Sleeping
Sleeping
Update app.py
Browse filesFixed analyze_text() function to return list of values, rather than a dict.
app.py
CHANGED
|
@@ -15,12 +15,12 @@ def analyze_text(text):
|
|
| 15 |
|
| 16 |
avg_word_length = char_count / word_count
|
| 17 |
|
| 18 |
-
return
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 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")
|