Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -43,9 +43,10 @@ def predict(dict, prompt="high quality, best quality", negative_prompt="", guida
|
|
| 43 |
generator=generator,
|
| 44 |
height=int(height), width=int(width),
|
| 45 |
guidance_scale=guidance_scale
|
| 46 |
-
)
|
| 47 |
|
| 48 |
-
|
|
|
|
| 49 |
|
| 50 |
|
| 51 |
css = '''
|
|
@@ -98,7 +99,8 @@ with image_blocks as demo:
|
|
| 98 |
''')
|
| 99 |
with gr.Row():
|
| 100 |
with gr.Column():
|
| 101 |
-
image = gr.Image(sources=
|
|
|
|
| 102 |
with gr.Row(elem_id="prompt-container", equal_height=True):
|
| 103 |
with gr.Row():
|
| 104 |
prompt = gr.Textbox(placeholder="Your prompt (you can leave it empty if you only want the image prompt as input)", show_label=False, elem_id="prompt")
|
|
|
|
| 43 |
generator=generator,
|
| 44 |
height=int(height), width=int(width),
|
| 45 |
guidance_scale=guidance_scale
|
| 46 |
+
)
|
| 47 |
|
| 48 |
+
torch.cuda.empty_cache
|
| 49 |
+
return output.images[0] #, gr.update(visible=True)
|
| 50 |
|
| 51 |
|
| 52 |
css = '''
|
|
|
|
| 99 |
''')
|
| 100 |
with gr.Row():
|
| 101 |
with gr.Column():
|
| 102 |
+
image = gr.Image(sources=None, elem_id="image_upload", type="pil", label="Upload", height=400)
|
| 103 |
+
|
| 104 |
with gr.Row(elem_id="prompt-container", equal_height=True):
|
| 105 |
with gr.Row():
|
| 106 |
prompt = gr.Textbox(placeholder="Your prompt (you can leave it empty if you only want the image prompt as input)", show_label=False, elem_id="prompt")
|