Spaces:
Running
on
Zero
Running
on
Zero
alfredplpl
commited on
Commit
·
7893837
1
Parent(s):
bfda42f
Update app.py
Browse files
app.py
CHANGED
@@ -42,9 +42,9 @@ def inference(prompt, guidance, steps, width=512, height=512, seed=0, img=None,
|
|
42 |
|
43 |
try:
|
44 |
if img is not None:
|
45 |
-
return img_to_img(prompt, neg_prompt, img, strength, guidance, steps, width, height, generator
|
46 |
else:
|
47 |
-
return txt_to_img(prompt, neg_prompt, guidance, steps, width, height, generator
|
48 |
except Exception as e:
|
49 |
return None, error_str(e)
|
50 |
def auto_prompt_correction(prompt_ui,neg_prompt_ui,cool_japan_type_ui):
|
@@ -141,6 +141,9 @@ with gr.Blocks(css=css) as demo:
|
|
141 |
with gr.Group():
|
142 |
with gr.Row():
|
143 |
cool_japan_type=gr.Radio(["Anime", "Manga", "Game"])
|
|
|
|
|
|
|
144 |
prompt = gr.Textbox(label="Prompt", show_label=False, max_lines=2,placeholder="[your prompt]").style(container=False)
|
145 |
generate = gr.Button(value="Generate").style(rounded=(False, True, True, False))
|
146 |
|
|
|
42 |
|
43 |
try:
|
44 |
if img is not None:
|
45 |
+
return img_to_img(prompt, neg_prompt, img, strength, guidance, steps, width, height, generator), None
|
46 |
else:
|
47 |
+
return txt_to_img(prompt, neg_prompt, guidance, steps, width, height, generator), None
|
48 |
except Exception as e:
|
49 |
return None, error_str(e)
|
50 |
def auto_prompt_correction(prompt_ui,neg_prompt_ui,cool_japan_type_ui):
|
|
|
141 |
with gr.Group():
|
142 |
with gr.Row():
|
143 |
cool_japan_type=gr.Radio(["Anime", "Manga", "Game"])
|
144 |
+
cool_japan_type.value="Anime"
|
145 |
+
|
146 |
+
with gr.Row():
|
147 |
prompt = gr.Textbox(label="Prompt", show_label=False, max_lines=2,placeholder="[your prompt]").style(container=False)
|
148 |
generate = gr.Button(value="Generate").style(rounded=(False, True, True, False))
|
149 |
|