Spaces:
Sleeping
Sleeping
Fix the output format of the analyze_text function
Browse files
app.py
CHANGED
@@ -14,12 +14,12 @@ def analyze_text(text):
|
|
14 |
char_count = len(text)
|
15 |
avg_word_length = char_count / word_count
|
16 |
|
17 |
-
return
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
|
24 |
with gr.Blocks() as demo:
|
25 |
gr.Markdown("# Text Analysis App")
|
|
|
14 |
char_count = len(text)
|
15 |
avg_word_length = char_count / word_count
|
16 |
|
17 |
+
return [
|
18 |
+
round(sentiment, 2),
|
19 |
+
word_count,
|
20 |
+
char_count,
|
21 |
+
round(avg_word_length, 2),
|
22 |
+
]
|
23 |
|
24 |
with gr.Blocks() as demo:
|
25 |
gr.Markdown("# Text Analysis App")
|