tayyabimam commited on
Commit
0e6f661
·
1 Parent(s): b939db8

Added FastAPI deployment files

Browse files
Dockerfile ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+ WORKDIR /app
3
+ COPY requirements.txt .
4
+ RUN pip install -r requirements.txt
5
+ COPY . .
6
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
Upload_videos/.gitkeep ADDED
File without changes
__pycache__/app.cpython-310.pyc ADDED
Binary file (14.7 kB). View file
 
__pycache__/app.cpython-312.pyc ADDED
Binary file (27.8 kB). View file
 
app.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+ app = FastAPI()
3
+ @app.get("/")
4
+ def home():
5
+ return {"status": "API ready"}
models/model_87_acc_20_frames_final_data.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f1b48a51886f487e7ce9880a59ddf6c44e7da0d5b5265ed772871e1e9b1c578
3
+ size 226547455
nixpacks.toml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [phases.setup]
2
+ nixPkgs = [
3
+ "python311",
4
+ "python311Packages.pip",
5
+ "python311Packages.virtualenv", # Alternative to venv
6
+ "cmake",
7
+ "gcc",
8
+ "gnumake",
9
+ "pkg-config"
10
+ ]
11
+
12
+ [phases.install]
13
+ cmds = [
14
+ "python -m virtualenv /opt/venv",
15
+ ". /opt/venv/bin/activate",
16
+ "pip install --upgrade pip",
17
+ "pip install -r requirements.txt"
18
+ ]
19
+
20
+ [start]
21
+ cmd = ". /opt/venv/bin/activate && uvicorn app:app --host 0.0.0.0 --port $PORT"
requirements.txt ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ fastapi
2
+ uvicorn
3
+ torch
4
+ torchvision
5
+ numpy
6
+ opencv-python
7
+ face_recognition
8
+ pillow
9
+ matplotlib
10
+ motor