Spaces:
Runtime error
Runtime error
jmanhype
commited on
Commit
·
aa33637
1
Parent(s):
138071a
Create absolute minimal setup with debugging
Browse files- Dockerfile +7 -3
- app.py +11 -11
Dockerfile
CHANGED
@@ -1,11 +1,15 @@
|
|
1 |
-
FROM python:3.9
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
5 |
-
RUN
|
|
|
|
|
|
|
6 |
|
7 |
COPY app.py .
|
|
|
8 |
|
9 |
EXPOSE 7860
|
10 |
|
11 |
-
CMD ["python", "app.py"]
|
|
|
1 |
+
FROM python:3.9
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
5 |
+
RUN python -c "print('Python is working')"
|
6 |
+
|
7 |
+
RUN pip install --no-cache-dir gradio==4.16.0 && \
|
8 |
+
python -c "import gradio; print('Gradio version:', gradio.__version__)"
|
9 |
|
10 |
COPY app.py .
|
11 |
+
RUN python -c "import os; print('Contents of /app:', os.listdir('.'))"
|
12 |
|
13 |
EXPOSE 7860
|
14 |
|
15 |
+
CMD ["python", "-u", "app.py"]
|
app.py
CHANGED
@@ -1,20 +1,20 @@
|
|
|
|
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
def
|
4 |
-
|
5 |
-
return f"
|
6 |
|
|
|
7 |
demo = gr.Interface(
|
8 |
-
fn=
|
9 |
-
inputs=
|
10 |
-
gr.Textbox(label="Prompt"),
|
11 |
-
gr.Image(label="Reference Image")
|
12 |
-
],
|
13 |
outputs="text",
|
14 |
-
title="
|
15 |
-
description="Generate videos from text and reference images"
|
16 |
)
|
17 |
|
18 |
if __name__ == "__main__":
|
19 |
-
print("
|
20 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
1 |
+
print("Starting app.py...")
|
2 |
+
|
3 |
import gradio as gr
|
4 |
+
print("Successfully imported gradio")
|
5 |
|
6 |
+
def hello(name):
|
7 |
+
print(f"Received request with name: {name}")
|
8 |
+
return f"Hello {name}!"
|
9 |
|
10 |
+
print("Creating Gradio interface...")
|
11 |
demo = gr.Interface(
|
12 |
+
fn=hello,
|
13 |
+
inputs="text",
|
|
|
|
|
|
|
14 |
outputs="text",
|
15 |
+
title="Basic Test"
|
|
|
16 |
)
|
17 |
|
18 |
if __name__ == "__main__":
|
19 |
+
print("Launching demo...")
|
20 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|