Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -175,10 +175,6 @@ def analyze_ticker(user_ticker: str):
|
|
175 |
full_text = article_data["title"] + " " + article_data["text"]
|
176 |
sentiment_score = predict_sentiment(full_text)
|
177 |
|
178 |
-
'''
|
179 |
-
snippet = article_data["text"][:500].replace("\n", " ").strip()
|
180 |
-
blurb = f"{article_data['title']}\n\n{snippet}..."
|
181 |
-
'''
|
182 |
cleaned_text = preprocess_text(article_data["text"])
|
183 |
short_blurb = cleaned_text[:300] + "..." if len(cleaned_text) > 300 else cleaned_text
|
184 |
blurb = f"{article_data['title']}\n\n{short_blurb}"
|
|
|
175 |
full_text = article_data["title"] + " " + article_data["text"]
|
176 |
sentiment_score = predict_sentiment(full_text)
|
177 |
|
|
|
|
|
|
|
|
|
178 |
cleaned_text = preprocess_text(article_data["text"])
|
179 |
short_blurb = cleaned_text[:300] + "..." if len(cleaned_text) > 300 else cleaned_text
|
180 |
blurb = f"{article_data['title']}\n\n{short_blurb}"
|