Spaces:
Sleeping
Sleeping
Commit
·
436b0dd
1
Parent(s):
32cf6bd
Changed Output to Default
Browse files
app.py
CHANGED
|
@@ -26,13 +26,14 @@ def analyze_text(text):
|
|
| 26 |
# # Text summarization
|
| 27 |
summary = summarizer(text, max_length=130, min_length=30, do_sample=False)
|
| 28 |
|
| 29 |
-
|
| 30 |
-
return {
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
}
|
|
|
|
| 36 |
|
| 37 |
# Create the Gradio interface
|
| 38 |
iface = gr.Interface(fn=analyze_text, inputs="text", outputs="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 |
+
# return {
|
| 31 |
+
# "sentiment": sentiment,
|
| 32 |
+
# "sentiment_score": sentiment_score,
|
| 33 |
+
# "keywords": keywords,
|
| 34 |
+
# "summary": summary,
|
| 35 |
+
# }
|
| 36 |
+
|
| 37 |
|
| 38 |
# Create the Gradio interface
|
| 39 |
iface = gr.Interface(fn=analyze_text, inputs="text", outputs="text")
|