Spaces:
Runtime error
Runtime error
Ruben Gres
commited on
Commit
·
761a377
1
Parent(s):
ec3efd7
added gradio service inside space
Browse files- Dockerfile +3 -2
- gradio-app.py +1 -0
Dockerfile
CHANGED
@@ -6,9 +6,10 @@ RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
|
|
6 |
|
7 |
ENV HOME=/home/user \
|
8 |
PATH=/home/user/.local/bin:$PATH \
|
9 |
-
|
|
|
10 |
URL_GRADIO=https://rgres-drawing2map.hf.space/
|
11 |
|
12 |
COPY ./static/ ./
|
13 |
|
14 |
-
CMD ["python", "
|
|
|
6 |
|
7 |
ENV HOME=/home/user \
|
8 |
PATH=/home/user/.local/bin:$PATH \
|
9 |
+
D2M_PORT=7860 \
|
10 |
+
GRADIO_PORT=8000 \
|
11 |
URL_GRADIO=https://rgres-drawing2map.hf.space/
|
12 |
|
13 |
COPY ./static/ ./
|
14 |
|
15 |
+
CMD ["python", "main.py"]
|
gradio-app.py
CHANGED
@@ -35,6 +35,7 @@ def generate_map(image, prompt, steps, seed):
|
|
35 |
|
36 |
demo = gr.Interface(
|
37 |
fn=generate_map,
|
|
|
38 |
inputs=["image", "text", gr.Slider(0,100), "number"],
|
39 |
outputs="image")
|
40 |
|
|
|
35 |
|
36 |
demo = gr.Interface(
|
37 |
fn=generate_map,
|
38 |
+
server_port=os.getenv('GRADIO_PORT', '7860'),
|
39 |
inputs=["image", "text", gr.Slider(0,100), "number"],
|
40 |
outputs="image")
|
41 |
|