Spaces:
Running
on
Zero
Running
on
Zero
alfredplpl
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -64,7 +64,7 @@ def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance
|
|
64 |
generator = generator
|
65 |
).images[0]
|
66 |
|
67 |
-
return image, seed
|
68 |
|
69 |
examples = [
|
70 |
"美味しい肉",
|
@@ -99,7 +99,8 @@ with gr.Blocks(css=css) as demo:
|
|
99 |
run_button = gr.Button("実行", scale=0)
|
100 |
|
101 |
result = gr.Image(label="結果", show_label=False)
|
102 |
-
|
|
|
103 |
with gr.Accordion("詳細設定", open=False):
|
104 |
|
105 |
negative_prompt = gr.Text(
|
@@ -162,7 +163,7 @@ with gr.Blocks(css=css) as demo:
|
|
162 |
triggers=[run_button.click, prompt.submit, negative_prompt.submit],
|
163 |
fn = infer,
|
164 |
inputs = [prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
|
165 |
-
outputs = [result, seed]
|
166 |
)
|
167 |
|
168 |
demo.launch()
|
|
|
64 |
generator = generator
|
65 |
).images[0]
|
66 |
|
67 |
+
return image, seed, upsampled_prompt
|
68 |
|
69 |
examples = [
|
70 |
"美味しい肉",
|
|
|
99 |
run_button = gr.Button("実行", scale=0)
|
100 |
|
101 |
result = gr.Image(label="結果", show_label=False)
|
102 |
+
generated_prompt = gr.Textbox(label="生成に使ったプロンプト", show_label=False, interactive=False)
|
103 |
+
|
104 |
with gr.Accordion("詳細設定", open=False):
|
105 |
|
106 |
negative_prompt = gr.Text(
|
|
|
163 |
triggers=[run_button.click, prompt.submit, negative_prompt.submit],
|
164 |
fn = infer,
|
165 |
inputs = [prompt, negative_prompt, seed, randomize_seed, width, height, guidance_scale, num_inference_steps],
|
166 |
+
outputs = [result, seed, generated_prompt]
|
167 |
)
|
168 |
|
169 |
demo.launch()
|