Todlong / config.py
cwpkd's picture
Update config.py
c672125 verified
raw
history blame contribute delete
880 Bytes
# 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