Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -160,7 +160,7 @@ def process_posts(profile_url, hashtags, num_posts):
|
|
| 160 |
# Sentiment and Language
|
| 161 |
content.add_run(f"Language: {detect_language(post['caption'])}\n")
|
| 162 |
emotions = analyze_sentiment(post['caption'])
|
| 163 |
-
content.add_run(f"Sentiment: {', '.join([f
|
| 164 |
|
| 165 |
# Hashtags and Category
|
| 166 |
hashtags = extract_hashtags(post['caption'])
|
|
|
|
| 160 |
# Sentiment and Language
|
| 161 |
content.add_run(f"Language: {detect_language(post['caption'])}\n")
|
| 162 |
emotions = analyze_sentiment(post['caption'])
|
| 163 |
+
content.add_run(f"Sentiment: {', '.join([f\"{e['label']} ({e['score']:.2f})\" for e in emotions])}\n")
|
| 164 |
|
| 165 |
# Hashtags and Category
|
| 166 |
hashtags = extract_hashtags(post['caption'])
|