Spaces:
Sleeping
Sleeping
Commit
·
cfdd4ea
1
Parent(s):
81762da
Updated Return Type
Browse files
app.py
CHANGED
@@ -26,7 +26,13 @@ def analyze_text(text):
|
|
26 |
# # Text summarization
|
27 |
summary = summarizer(text, max_length=130, min_length=30, do_sample=False)
|
28 |
|
29 |
-
return f"Sentiment: {sentiment}, Score: {sentiment_score}\nKeywords: {keywords}\nSummary: {summary}"
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
|
32 |
# Create the Gradio interface
|
|
|
26 |
# # Text summarization
|
27 |
summary = summarizer(text, max_length=130, min_length=30, do_sample=False)
|
28 |
|
29 |
+
# return f"Sentiment: {sentiment}, Score: {sentiment_score}\nKeywords: {keywords}\nSummary: {summary}"
|
30 |
+
return {
|
31 |
+
"sentiment": sentiment,
|
32 |
+
"sentiment_score": sentiment_score,
|
33 |
+
"keywords": keywords,
|
34 |
+
"summary": summary,
|
35 |
+
}
|
36 |
|
37 |
|
38 |
# Create the Gradio interface
|