ai-news-analyzer / debug_sentiment.py
Sigrid De los Santos
debugging for analysis tables
7cb8f2e
raw
history blame contribute delete
687 Bytes
# debug_sentiment.py
import sys
import os
# Add src to path
sys.path.append(os.path.join(os.path.dirname(__file__), 'src'))
from fin_interpreter import analyze_article
print("πŸ” Debugging FinBERT sentiment analysis...\n")
sample_articles = [
"Tesla reported record profits and plans a major expansion in Europe.",
"The company faces regulatory scrutiny and potential lawsuits over its new product.",
"The startup raised $50M in Series A funding from top venture capital firms."
]
for idx, text in enumerate(sample_articles, 1):
print(f"--- Article {idx} ---")
result = analyze_article(text)
print(f"Text: {text}")
print(f"Result: {result}")
print()