Spaces:
Sleeping
Sleeping
Surya T commited on
Commit ·
ddde671
1
Parent(s): 685229c
fix gradio app
Browse files- .gitignore +1 -0
- Dockerfile +12 -2
- app.py +2 -0
- requirements.txt +2 -0
.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
venv
|
Dockerfile
CHANGED
|
@@ -1,9 +1,19 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
| 4 |
COPY . .
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
EXPOSE 7860
|
|
|
|
| 7 |
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
| 8 |
|
| 9 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
RUN useradd -m -u 1000 user
|
| 4 |
+
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
COPY . .
|
| 8 |
+
|
| 9 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
| 10 |
+
|
| 11 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 12 |
+
|
| 13 |
+
COPY --chown=user . /app
|
| 14 |
+
|
| 15 |
EXPOSE 7860
|
| 16 |
+
|
| 17 |
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
| 18 |
|
| 19 |
CMD ["python", "app.py"]
|
app.py
CHANGED
|
@@ -74,3 +74,5 @@ with gr.Blocks() as demo:
|
|
| 74 |
inputs=[generator_json_file, generator_custom_nodes],
|
| 75 |
outputs=generator_output_url
|
| 76 |
)
|
|
|
|
|
|
|
|
|
| 74 |
inputs=[generator_json_file, generator_custom_nodes],
|
| 75 |
outputs=generator_output_url
|
| 76 |
)
|
| 77 |
+
|
| 78 |
+
demo.launch()
|
requirements.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
gradio
|
| 2 |
+
pillow
|