666ghj

Update requirements.txt to clarify optional machine learning dependencies and pr…

…ovide installation notes for CPU and GPU versions of torch.
@@ -49,11 +49,12 @@ plotly>=5.17.0 @@ -49,11 +49,12 @@ plotly>=5.17.0
49 matplotlib==3.9.0 49 matplotlib==3.9.0
50 wordcloud==1.9.3 50 wordcloud==1.9.3
51 51
52 -# ===== 机器学习(可选,用于情感分析) =====  
53 -# torch>=2.0.0 # 需要单独安装CUDA版本  
54 -# transformers>=4.30.0  
55 -# scikit-learn>=1.3.0  
56 -# xgboost>=2.0.0 52 +# ===== 机器学习(可选,用于情感分析,不安装也没事写了容错程序) =====
  53 +torch>=2.0.0 # CPU版本
  54 +transformers>=4.30.0
  55 +scikit-learn>=1.3.0
  56 +xgboost>=2.0.0
  57 +# NOTE:如果要安装GPU版本的torch,指令为pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu126
57 58
58 # ===== 工具库 ===== 59 # ===== 工具库 =====
59 python-dotenv>=1.0.0 60 python-dotenv>=1.0.0