Spaces:
Running
Running
Commit ·
f494c66
1
Parent(s): 14f768f
Dockerise
Browse files- .gitignore +1 -0
- Dockerfile +20 -0
- app.py +1 -1
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
.ipynb_checkpoints
|
Dockerfile
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use an official Python runtime as a base image
|
| 2 |
+
FROM python:3.10-slim
|
| 3 |
+
|
| 4 |
+
# Set the working directory in the container
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Copy the requirements.txt file into the container
|
| 8 |
+
COPY requirements.txt /app/
|
| 9 |
+
|
| 10 |
+
# Install dependencies
|
| 11 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
+
|
| 13 |
+
# Copy the app files into the container
|
| 14 |
+
COPY . /app/
|
| 15 |
+
|
| 16 |
+
# Expose the port the app runs on
|
| 17 |
+
EXPOSE 7860
|
| 18 |
+
|
| 19 |
+
# Run the application
|
| 20 |
+
CMD ["python", "app.py"]
|
app.py
CHANGED
|
@@ -50,4 +50,4 @@ iface = gr.Interface(
|
|
| 50 |
description="Upload two images and set a threshold to check if the faces match."
|
| 51 |
)
|
| 52 |
|
| 53 |
-
iface.launch(server_name="0.0.0.0")
|
|
|
|
| 50 |
description="Upload two images and set a threshold to check if the faces match."
|
| 51 |
)
|
| 52 |
|
| 53 |
+
iface.launch(server_name="0.0.0.0")
|