Developer commited on
Commit
ec429d0
·
1 Parent(s): 1d10b0a

Fix: Use CPU-only torch for HuggingFace Spaces free tier

Browse files
Files changed (2) hide show
  1. app.py +12 -0
  2. requirements.txt +2 -1
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Entry point for HuggingFace Spaces - redirects to streamlit_app."""
2
+ import subprocess
3
+ import sys
4
+
5
+ if __name__ == "__main__":
6
+ subprocess.run([
7
+ sys.executable, "-m", "streamlit", "run",
8
+ "streamlit_app.py",
9
+ "--server.port=7860",
10
+ "--server.address=0.0.0.0",
11
+ "--server.headless=true"
12
+ ])
requirements.txt CHANGED
@@ -9,7 +9,8 @@ openai>=1.12.0
9
  # Embeddings and Vector Store
10
  sentence-transformers>=2.2.0
11
  transformers>=4.35.0
12
- torch>=2.0.0
 
13
  chromadb>=0.4.0
14
  qdrant-client>=1.7.0
15
 
 
9
  # Embeddings and Vector Store
10
  sentence-transformers>=2.2.0
11
  transformers>=4.35.0
12
+ --extra-index-url https://download.pytorch.org/whl/cpu
13
+ torch
14
  chromadb>=0.4.0
15
  qdrant-client>=1.7.0
16