Spaces:
Runtime error
Runtime error
jmanhype
commited on
Commit
·
60fb7c5
1
Parent(s):
2d9b3a1
Create minimal setup to test build system
Browse files- Dockerfile +3 -21
- app.py +6 -12
Dockerfile
CHANGED
@@ -1,29 +1,11 @@
|
|
1 |
FROM python:3.9-slim
|
2 |
|
3 |
-
|
4 |
-
RUN apt-get update && apt-get install -y \
|
5 |
-
git \
|
6 |
-
ffmpeg \
|
7 |
-
libsm6 \
|
8 |
-
libxext6 \
|
9 |
-
&& rm -rf /var/lib/apt/lists/*
|
10 |
|
11 |
-
# Create and switch to non-root user
|
12 |
-
RUN useradd -m -u 1000 user
|
13 |
-
USER user
|
14 |
-
ENV HOME=/home/user \
|
15 |
-
PATH=/home/user/.local/bin:$PATH \
|
16 |
-
PYTHONUNBUFFERED=1
|
17 |
-
|
18 |
-
WORKDIR /home/user/app
|
19 |
-
|
20 |
-
# Install Python packages with progress bar
|
21 |
-
ENV PIP_PROGRESS_BAR=on
|
22 |
RUN pip install --no-cache-dir gradio==4.16.0
|
23 |
|
24 |
-
|
25 |
-
COPY --chown=user:user app.py .
|
26 |
|
27 |
EXPOSE 7860
|
28 |
|
29 |
-
CMD ["python", "
|
|
|
1 |
FROM python:3.9-slim
|
2 |
|
3 |
+
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
RUN pip install --no-cache-dir gradio==4.16.0
|
6 |
|
7 |
+
COPY app.py .
|
|
|
8 |
|
9 |
EXPOSE 7860
|
10 |
|
11 |
+
CMD ["python", "app.py"]
|
app.py
CHANGED
@@ -1,20 +1,14 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
def
|
4 |
-
|
5 |
-
return "Video generation functionality coming soon!"
|
6 |
|
7 |
demo = gr.Interface(
|
8 |
-
fn=
|
9 |
-
inputs=
|
10 |
-
|
11 |
-
|
12 |
-
],
|
13 |
-
outputs=gr.Text(),
|
14 |
-
title="MuseV Demo",
|
15 |
-
description="Generate videos from text and reference images (Setup in progress)"
|
16 |
)
|
17 |
|
18 |
if __name__ == "__main__":
|
19 |
-
print("Starting MuseV Demo...")
|
20 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
+
def hello(name):
|
4 |
+
return f"Hello {name}!"
|
|
|
5 |
|
6 |
demo = gr.Interface(
|
7 |
+
fn=hello,
|
8 |
+
inputs="text",
|
9 |
+
outputs="text",
|
10 |
+
title="Test App"
|
|
|
|
|
|
|
|
|
11 |
)
|
12 |
|
13 |
if __name__ == "__main__":
|
|
|
14 |
demo.launch(server_name="0.0.0.0", server_port=7860)
|