File size: 880 Bytes
dd3fbab
 
 
 
 
 
 
c672125
 
dd3fbab
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# config.py
"""
Configuration file for Yahoo Finance Sentiment Analysis
"""

# Model configurations
FINBERT_MODEL = "ProsusAI/finbert"
# เปลี่ยนเป็นโมเดลที่ไม่ต้องขอสิทธิ์
GEMMA_MODEL = "HuggingFaceH4/zephyr-7b-beta"  # หรือใช้ "microsoft/phi-2" สำหรับโมเดลเล็กกว่า

# Yahoo Finance configurations
YAHOO_FINANCE_BASE_URL = "https://finance.yahoo.com"
USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"

# Sentiment thresholds
SENTIMENT_THRESHOLDS = {
    "positive": 0.05,
    "negative": -0.05
}

# Available stock symbols for quick selection
POPULAR_STOCKS = [
    "AAPL", "GOOGL", "MSFT", "AMZN", "TSLA",
    "META", "NVDA", "JPM", "V", "WMT"
]

# LLM generation parameters
LLM_MAX_LENGTH = 512
LLM_TEMPERATURE = 0.7
LLM_TOP_P = 0.9