Spaces:
Sleeping
Sleeping
Vasudevakrishna
commited on
Commit
•
a2152cc
1
Parent(s):
3f93fad
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from PIL import Image
|
3 |
+
from utils import generate_gradio_images
|
4 |
+
|
5 |
+
# Create a Gradio interface
|
6 |
+
iface = gr.Interface(
|
7 |
+
fn=generate_gradio_images, # Set to None since we won't use a function
|
8 |
+
inputs=[
|
9 |
+
gr.Textbox("Enter Prompt"),
|
10 |
+
gr.Slider("Time Stamps", value=1, step=1, maximum=50),
|
11 |
+
gr.Checkbox(label = "Use custom loss",value=False)
|
12 |
+
],
|
13 |
+
outputs=[gr.Image(type="pil", height=512, width = 512),
|
14 |
+
gr.Image(type="pil", height=512, width = 512),
|
15 |
+
gr.Image(type="pil", height=512, width = 512),
|
16 |
+
gr.Image(type="pil", height=512, width = 512),
|
17 |
+
gr.Image(type="pil", height=512, width = 512)] # Gradio Image component for displaying images
|
18 |
+
)
|
19 |
+
|
20 |
+
# Launch the Gradio interface
|
21 |
+
iface.launch()
|