Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ pipe = DiffusionPipeline.from_pretrained(
|
|
20 |
#generator = torch.Generator("cuda").manual_seed(0)
|
21 |
|
22 |
def infer(prompt, init_image):
|
23 |
-
init_image = Image.open(
|
24 |
init_image = init_image.resize((512, 512))
|
25 |
|
26 |
res = pipe.train(
|
@@ -101,7 +101,7 @@ with gr.Blocks(css=css) as block:
|
|
101 |
gr.HTML(title)
|
102 |
|
103 |
prompt_input = gr.Textbox(label="Target text", placeholder="Describe the image with what you want to change about the subject")
|
104 |
-
image_init = gr.Image(source="upload", type="
|
105 |
|
106 |
submit_btn = gr.Button("Submit")
|
107 |
|
|
|
20 |
#generator = torch.Generator("cuda").manual_seed(0)
|
21 |
|
22 |
def infer(prompt, init_image):
|
23 |
+
init_image = Image.open(init_image).convert("RGB")
|
24 |
init_image = init_image.resize((512, 512))
|
25 |
|
26 |
res = pipe.train(
|
|
|
101 |
gr.HTML(title)
|
102 |
|
103 |
prompt_input = gr.Textbox(label="Target text", placeholder="Describe the image with what you want to change about the subject")
|
104 |
+
image_init = gr.Image(source="upload", type="filepath",label="Input Image")
|
105 |
|
106 |
submit_btn = gr.Button("Submit")
|
107 |
|