Spaces:
Runtime error
Runtime error
Cascade Bot
commited on
Commit
·
865ec2f
1
Parent(s):
1d75522
Added networkx dependency
Browse files- requirements.txt +2 -1
- space.yml +3 -4
- startup.sh +6 -0
requirements.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
# Core dependencies
|
2 |
fastapi>=0.68.0
|
3 |
uvicorn>=0.15.0
|
4 |
-
gradio
|
5 |
pydantic>=2.0.0
|
6 |
python-dotenv>=0.19.0
|
7 |
|
@@ -17,6 +17,7 @@ numpy>=1.24.0
|
|
17 |
pandas>=2.1.0
|
18 |
scikit-learn>=1.3.2
|
19 |
plotly>=5.18.0
|
|
|
20 |
|
21 |
# Model integration
|
22 |
huggingface-hub>=0.19.4
|
|
|
1 |
# Core dependencies
|
2 |
fastapi>=0.68.0
|
3 |
uvicorn>=0.15.0
|
4 |
+
gradio>=4.44.1
|
5 |
pydantic>=2.0.0
|
6 |
python-dotenv>=0.19.0
|
7 |
|
|
|
17 |
pandas>=2.1.0
|
18 |
scikit-learn>=1.3.2
|
19 |
plotly>=5.18.0
|
20 |
+
networkx>=3.2.1 # Added for graph operations
|
21 |
|
22 |
# Model integration
|
23 |
huggingface-hub>=0.19.4
|
space.yml
CHANGED
@@ -20,8 +20,7 @@ compute:
|
|
20 |
# Environment setup
|
21 |
env:
|
22 |
- MODEL_BACKEND=groq
|
23 |
-
- GROQ_API_KEY
|
24 |
-
- HUGGINGFACE_TOKEN
|
25 |
- ENABLE_LOCAL_FALLBACK=true
|
26 |
- CACHE_MODELS=false
|
27 |
- GRADIO_SERVER_PORT=7860
|
@@ -47,9 +46,8 @@ models:
|
|
47 |
# Dependencies
|
48 |
dependencies:
|
49 |
python:
|
50 |
-
- "gradio
|
51 |
- "groq>=0.4.1"
|
52 |
-
- "huggingface-hub>=0.19.4"
|
53 |
- "fastapi>=0.68.0"
|
54 |
- "uvicorn>=0.15.0"
|
55 |
- "pydantic>=2.0.0"
|
@@ -60,6 +58,7 @@ dependencies:
|
|
60 |
- "pandas>=2.1.0"
|
61 |
- "scikit-learn>=1.3.2"
|
62 |
- "plotly>=5.18.0"
|
|
|
63 |
system:
|
64 |
- git-lfs
|
65 |
- cmake
|
|
|
20 |
# Environment setup
|
21 |
env:
|
22 |
- MODEL_BACKEND=groq
|
23 |
+
- GROQ_API_KEY # This will be loaded from repository secrets
|
|
|
24 |
- ENABLE_LOCAL_FALLBACK=true
|
25 |
- CACHE_MODELS=false
|
26 |
- GRADIO_SERVER_PORT=7860
|
|
|
46 |
# Dependencies
|
47 |
dependencies:
|
48 |
python:
|
49 |
+
- "gradio>=4.44.1"
|
50 |
- "groq>=0.4.1"
|
|
|
51 |
- "fastapi>=0.68.0"
|
52 |
- "uvicorn>=0.15.0"
|
53 |
- "pydantic>=2.0.0"
|
|
|
58 |
- "pandas>=2.1.0"
|
59 |
- "scikit-learn>=1.3.2"
|
60 |
- "plotly>=5.18.0"
|
61 |
+
- "networkx>=3.2.1" # Added for graph operations
|
62 |
system:
|
63 |
- git-lfs
|
64 |
- cmake
|
startup.sh
CHANGED
@@ -5,6 +5,12 @@ set -e
|
|
5 |
|
6 |
echo "Starting initialization..."
|
7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
# Update pip and install dependencies
|
9 |
echo "Updating pip and installing dependencies..."
|
10 |
python -m pip install --upgrade pip
|
|
|
5 |
|
6 |
echo "Starting initialization..."
|
7 |
|
8 |
+
# Check for required environment variables
|
9 |
+
if [ -z "$GROQ_API_KEY" ]; then
|
10 |
+
echo "Error: GROQ_API_KEY is not set. Please add it as a secret in your Hugging Face space settings."
|
11 |
+
exit 1
|
12 |
+
fi
|
13 |
+
|
14 |
# Update pip and install dependencies
|
15 |
echo "Updating pip and installing dependencies..."
|
16 |
python -m pip install --upgrade pip
|