File size: 687 Bytes
7cb8f2e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 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()