Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -45,7 +45,6 @@ def predict(
|
|
45 |
prompt: str,
|
46 |
negative_prompt: str,
|
47 |
guidance_scale: float = 5.0,
|
48 |
-
ddim_steps: int = 50,
|
49 |
seed: int = 0,
|
50 |
randomize_seed: bool = True,
|
51 |
):
|
@@ -56,7 +55,6 @@ def predict(
|
|
56 |
height=512,
|
57 |
negative_prompt=negative_prompt,
|
58 |
guidance_scale=guidance_scale,
|
59 |
-
ddim_steps=ddim_steps,
|
60 |
generator=generator,
|
61 |
num_inference_steps=50,
|
62 |
) # type: ignore
|
@@ -89,9 +87,6 @@ Model card: https://huggingface.co/Intel/ldm3d-pano<br>
|
|
89 |
guidance_scale = gr.Slider(
|
90 |
label="Guidance Scale", minimum=0, maximum=10, step=0.1, value=5.0
|
91 |
)
|
92 |
-
ddim_steps = gr.Slider(
|
93 |
-
label="DDIM Steps", minimum=0, maximum=200, step=1, value=50
|
94 |
-
)
|
95 |
randomize_seed = gr.Checkbox(label="Randomize Seed", value=True)
|
96 |
seed = gr.Slider(label="Seed", minimum=0,
|
97 |
maximum=2**64 - 1, step=1)
|
@@ -100,21 +95,21 @@ Model card: https://huggingface.co/Intel/ldm3d-pano<br>
|
|
100 |
with gr.Row():
|
101 |
new_btn = gr.Button("New Image")
|
102 |
with gr.Column(scale=2):
|
103 |
-
html = gr.HTML()
|
104 |
with gr.Row():
|
105 |
rgb = gr.Image(label="RGB Image", type="filepath")
|
106 |
depth = gr.Image(label="Depth Image", type="filepath")
|
107 |
gr.Examples(
|
108 |
examples=[
|
109 |
-
["360 view of a large bedroom", "", 7.0,
|
110 |
-
inputs=[prompt, negative_prompt, guidance_scale,
|
111 |
outputs=[rgb, depth, generated_seed, html],
|
112 |
fn=predict,
|
113 |
cache_examples=True)
|
114 |
|
115 |
new_btn.click(
|
116 |
fn=predict,
|
117 |
-
inputs=[prompt, negative_prompt, guidance_scale,
|
118 |
outputs=[rgb, depth, generated_seed, html],
|
119 |
)
|
120 |
|
|
|
45 |
prompt: str,
|
46 |
negative_prompt: str,
|
47 |
guidance_scale: float = 5.0,
|
|
|
48 |
seed: int = 0,
|
49 |
randomize_seed: bool = True,
|
50 |
):
|
|
|
55 |
height=512,
|
56 |
negative_prompt=negative_prompt,
|
57 |
guidance_scale=guidance_scale,
|
|
|
58 |
generator=generator,
|
59 |
num_inference_steps=50,
|
60 |
) # type: ignore
|
|
|
87 |
guidance_scale = gr.Slider(
|
88 |
label="Guidance Scale", minimum=0, maximum=10, step=0.1, value=5.0
|
89 |
)
|
|
|
|
|
|
|
90 |
randomize_seed = gr.Checkbox(label="Randomize Seed", value=True)
|
91 |
seed = gr.Slider(label="Seed", minimum=0,
|
92 |
maximum=2**64 - 1, step=1)
|
|
|
95 |
with gr.Row():
|
96 |
new_btn = gr.Button("New Image")
|
97 |
with gr.Column(scale=2):
|
98 |
+
html = gr.HTML(height='50%')
|
99 |
with gr.Row():
|
100 |
rgb = gr.Image(label="RGB Image", type="filepath")
|
101 |
depth = gr.Image(label="Depth Image", type="filepath")
|
102 |
gr.Examples(
|
103 |
examples=[
|
104 |
+
["360 view of a large bedroom", "", 7.0, 42, False]],
|
105 |
+
inputs=[prompt, negative_prompt, guidance_scale, seed, randomize_seed],
|
106 |
outputs=[rgb, depth, generated_seed, html],
|
107 |
fn=predict,
|
108 |
cache_examples=True)
|
109 |
|
110 |
new_btn.click(
|
111 |
fn=predict,
|
112 |
+
inputs=[prompt, negative_prompt, guidance_scale, seed, randomize_seed],
|
113 |
outputs=[rgb, depth, generated_seed, html],
|
114 |
)
|
115 |
|