Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -275,6 +275,9 @@ def api_fn(api):
|
|
275 |
|
276 |
@spaces.GPU(duration=100)
|
277 |
def generate(prompt, vp_pos, vp_neg, slider):
|
|
|
|
|
|
|
278 |
print(f"prompt: {prompt}")
|
279 |
image = pipe(prompt=prompt,
|
280 |
num_inference_steps=40,
|
@@ -398,7 +401,7 @@ with gr.Blocks(css=css, title="ViPer Demo", theme=gr.themes.Base()) as demo:
|
|
398 |
container=False,
|
399 |
)
|
400 |
|
401 |
-
run_button = gr.Button("Run", scale=0, interactive=
|
402 |
|
403 |
result = gr.Image(label="Result", show_label=False, interactive=False)
|
404 |
|
|
|
275 |
|
276 |
@spaces.GPU(duration=100)
|
277 |
def generate(prompt, vp_pos, vp_neg, slider):
|
278 |
+
if vp_pos == "" and vp_neg == "":
|
279 |
+
slider = 0
|
280 |
+
|
281 |
print(f"prompt: {prompt}")
|
282 |
image = pipe(prompt=prompt,
|
283 |
num_inference_steps=40,
|
|
|
401 |
container=False,
|
402 |
)
|
403 |
|
404 |
+
run_button = gr.Button("Run", scale=0, interactive=True)
|
405 |
|
406 |
result = gr.Image(label="Result", show_label=False, interactive=False)
|
407 |
|