ayushm98 commited on
Commit
76d28ef
·
1 Parent(s): c9b651f

feat: add Hugging Face Spaces deployment

Browse files

- Add Spaces entry point (app.py)
- Add standalone requirements.txt
- Add Dockerfile for Spaces deployment
- Enable full-stack deployment on HF

Files changed (3) hide show
  1. Dockerfile.spaces +18 -0
  2. app.py +13 -0
  3. requirements.txt +6 -0
Dockerfile.spaces ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install dependencies
6
+ COPY pyproject.toml ./
7
+ RUN pip install poetry && poetry config virtualenvs.create false && poetry install --no-dev
8
+
9
+ # Copy application
10
+ COPY src/ ./src/
11
+ COPY app.py ./
12
+
13
+ # Expose ports
14
+ EXPOSE 7860 8000
15
+
16
+ # Start both API and UI
17
+ CMD uvicorn cascade.api.main:app --host 0.0.0.0 --port 8000 & \
18
+ streamlit run app.py --server.port 7860 --server.address 0.0.0.0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Hugging Face Spaces entry point for Cascade UI."""
2
+
3
+ import sys
4
+ import os
5
+
6
+ # Add src to path
7
+ sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src'))
8
+
9
+ # Import and run the main app
10
+ from cascade.ui.app import main
11
+
12
+ if __name__ == "__main__":
13
+ main()
requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ streamlit==1.31.0
2
+ httpx==0.26.0
3
+ plotly==5.18.0
4
+ pandas==2.1.4
5
+ pydantic==2.5.3
6
+ pydantic-settings==2.1.0