Spaces:
Running
Running
# 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() | |