arnabg95 commited on
Commit
78b9567
·
1 Parent(s): 90394a2
Files changed (4) hide show
  1. Dockerfile +16 -0
  2. __pycache__/app.cpython-310.pyc +0 -0
  3. app.py +14 -0
  4. requirements.txt +79 -0
Dockerfile ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
+ # you will also find guides on how best to write your Dockerfile
3
+
4
+ FROM python:3.9
5
+
6
+ RUN useradd -m -u 1000 user
7
+ USER user
8
+ ENV PATH="/home/user/.local/bin:$PATH"
9
+
10
+ WORKDIR /app
11
+
12
+ COPY --chown=user ./requirements.txt requirements.txt
13
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
+
15
+ COPY --chown=user . /app
16
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
__pycache__/app.cpython-310.pyc ADDED
Binary file (563 Bytes). View file
 
app.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+ from deepface import DeepFace
3
+
4
+ app = FastAPI()
5
+
6
+ @app.get("/")
7
+ def greet_json():
8
+ return {"Hello": "World!"}
9
+
10
+ @app.get("/verify")
11
+ def verify(image1: str, images: list[str]):
12
+ print(image1)
13
+ print(images)
14
+ return "ok"
requirements.txt ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ absl-py==2.1.0
2
+ annotated-types==0.7.0
3
+ anyio==4.8.0
4
+ astunparse==1.6.3
5
+ beautifulsoup4==4.13.3
6
+ blinker==1.9.0
7
+ certifi==2025.1.31
8
+ charset-normalizer==3.4.1
9
+ click==8.1.8
10
+ deepface==0.0.93
11
+ exceptiongroup==1.2.2
12
+ fastapi==0.115.11
13
+ filelock==3.17.0
14
+ fire==0.7.0
15
+ Flask==3.1.0
16
+ flask-cors==5.0.1
17
+ flatbuffers==25.2.10
18
+ gast==0.6.0
19
+ gdown==5.2.0
20
+ google-pasta==0.2.0
21
+ grpcio==1.70.0
22
+ gunicorn==23.0.0
23
+ h11==0.14.0
24
+ h5py==3.13.0
25
+ httptools==0.6.4
26
+ idna==3.10
27
+ itsdangerous==2.2.0
28
+ Jinja2==3.1.6
29
+ joblib==1.4.2
30
+ keras==3.9.0
31
+ libclang==18.1.1
32
+ lz4==4.4.3
33
+ Markdown==3.7
34
+ markdown-it-py==3.0.0
35
+ MarkupSafe==3.0.2
36
+ mdurl==0.1.2
37
+ ml-dtypes==0.4.1
38
+ mtcnn==1.0.0
39
+ namex==0.0.8
40
+ numpy==2.0.2
41
+ opencv-python==4.11.0.86
42
+ opt_einsum==3.4.0
43
+ optree==0.14.1
44
+ packaging==24.2
45
+ pandas==2.2.3
46
+ pillow==11.1.0
47
+ protobuf==5.29.3
48
+ pydantic==2.10.6
49
+ pydantic_core==2.27.2
50
+ Pygments==2.19.1
51
+ PySocks==1.7.1
52
+ python-dateutil==2.9.0.post0
53
+ python-dotenv==1.0.1
54
+ pytz==2025.1
55
+ PyYAML==6.0.2
56
+ requests==2.32.3
57
+ retina-face==0.0.17
58
+ rich==13.9.4
59
+ six==1.17.0
60
+ sniffio==1.3.1
61
+ soupsieve==2.6
62
+ starlette==0.46.1
63
+ tensorboard==2.18.0
64
+ tensorboard-data-server==0.7.2
65
+ tensorflow==2.18.0
66
+ tensorflow-io-gcs-filesystem==0.37.1
67
+ tensorflow_cpu==2.18.0
68
+ termcolor==2.5.0
69
+ tf_keras==2.18.0
70
+ tqdm==4.67.1
71
+ typing_extensions==4.12.2
72
+ tzdata==2025.1
73
+ urllib3==2.3.0
74
+ uvicorn==0.34.0
75
+ uvloop==0.21.0
76
+ watchfiles==1.0.4
77
+ websockets==15.0.1
78
+ Werkzeug==3.1.3
79
+ wrapt==1.17.2