Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,7 +13,12 @@ from config import AVAILABLE_MODELS, DEFAULT_TICKERS, AVAILABLE_TIMEFRAMES, AVAI
|
|
| 13 |
from newsapi import NewsApiClient
|
| 14 |
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
analyzer = SentimentIntensityAnalyzer()
|
| 18 |
|
| 19 |
def sentiment_analysis(ticker, start_date, end_date, api_key):
|
|
|
|
| 13 |
from newsapi import NewsApiClient
|
| 14 |
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
|
| 15 |
|
| 16 |
+
log_path = os.path.join("/tmp", "debug.log")
|
| 17 |
+
os.makedirs("/tmp", exist_ok=True)
|
| 18 |
+
logging.basicConfig(level=logging.INFO, handlers=[
|
| 19 |
+
logging.FileHandler(log_path),
|
| 20 |
+
logging.StreamHandler()
|
| 21 |
+
])
|
| 22 |
analyzer = SentimentIntensityAnalyzer()
|
| 23 |
|
| 24 |
def sentiment_analysis(ticker, start_date, end_date, api_key):
|