Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ def read_content(file_path: str) -> str:
|
|
19 |
|
20 |
return content
|
21 |
|
22 |
-
def predict(dict, prompt="", negative_prompt="", guidance_scale=7.5, steps=30, strength=0.8,model="Realistic_V5.0", scheduler="DPMSolverMultistepScheduler-Karras"
|
23 |
|
24 |
pipe = AutoPipelineForInpainting.from_pretrained("SG161222/Realistic_Vision_V5.0_noVAE",vae=vae).to("cuda")
|
25 |
|
@@ -141,7 +141,6 @@ with image_blocks as demo:
|
|
141 |
steps = gr.Number(value=40, minimum=10, maximum=100, step=1, label="steps")
|
142 |
strength = gr.Number(value=0.8, minimum=0.01, maximum=1.0, step=0.01, label="strength")
|
143 |
negative_prompt = gr.Textbox(label="negative_prompt", placeholder="Your negative prompt", info="what you don't want to see in the image")
|
144 |
-
seed = gr.Dropdown(label="Seed", choices=[0,21,42], value="42")
|
145 |
with gr.Row(equal_height=True):
|
146 |
models = ["Realistic_V5.0","Realistic_V5.1","Realistic_V6.0","Epic_Realism"]
|
147 |
model = gr.Dropdown(label="Models",choices=models,value="Realistic_V5.0")
|
@@ -157,8 +156,8 @@ with image_blocks as demo:
|
|
157 |
share_button = gr.Button("Share to community", elem_id="share-btn",visible=True)
|
158 |
|
159 |
|
160 |
-
btn.click(fn=predict, inputs=[image, prompt, negative_prompt, guidance_scale, steps, strength, model, scheduler
|
161 |
-
prompt.submit(fn=predict, inputs=[image, prompt, negative_prompt, guidance_scale, steps, strength, model, scheduler
|
162 |
share_button.click(None, [], [], _js=share_js)
|
163 |
|
164 |
|
|
|
19 |
|
20 |
return content
|
21 |
|
22 |
+
def predict(dict, prompt="", negative_prompt="", guidance_scale=7.5, steps=30, strength=0.8,model="Realistic_V5.0", scheduler="DPMSolverMultistepScheduler-Karras"):
|
23 |
|
24 |
pipe = AutoPipelineForInpainting.from_pretrained("SG161222/Realistic_Vision_V5.0_noVAE",vae=vae).to("cuda")
|
25 |
|
|
|
141 |
steps = gr.Number(value=40, minimum=10, maximum=100, step=1, label="steps")
|
142 |
strength = gr.Number(value=0.8, minimum=0.01, maximum=1.0, step=0.01, label="strength")
|
143 |
negative_prompt = gr.Textbox(label="negative_prompt", placeholder="Your negative prompt", info="what you don't want to see in the image")
|
|
|
144 |
with gr.Row(equal_height=True):
|
145 |
models = ["Realistic_V5.0","Realistic_V5.1","Realistic_V6.0","Epic_Realism"]
|
146 |
model = gr.Dropdown(label="Models",choices=models,value="Realistic_V5.0")
|
|
|
156 |
share_button = gr.Button("Share to community", elem_id="share-btn",visible=True)
|
157 |
|
158 |
|
159 |
+
btn.click(fn=predict, inputs=[image, prompt, negative_prompt, guidance_scale, steps, strength, model, scheduler], outputs=[image_out,share_btn_container], api_name='run')
|
160 |
+
prompt.submit(fn=predict, inputs=[image, prompt, negative_prompt, guidance_scale, steps, strength, model, scheduler], outputs=[image_out,share_btn_container])
|
161 |
share_button.click(None, [], [], _js=share_js)
|
162 |
|
163 |
|