Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -212,10 +212,9 @@ with gr.Blocks(css=css) as demo:
|
|
212 |
|
213 |
with gr.Row(elem_id="prompt-container"):
|
214 |
with gr.Column():
|
215 |
-
|
216 |
-
with gr.Column(scale = 0.1):
|
217 |
-
btn_refresh = gr.Button(value="Refresh to get deployed models")
|
218 |
btn_refresh.click(None, js="window.location.reload()")
|
|
|
219 |
|
220 |
with gr.Row(elem_id="prompt-container"):
|
221 |
text_prompt = gr.Textbox(label="Prompt", placeholder="a cute dog", value = "a lovely cat", lines=1, elem_id="prompt-text-input")
|
@@ -228,6 +227,20 @@ with gr.Blocks(css=css) as demo:
|
|
228 |
negative_prompt = gr.Textbox(label="Negative Prompt", value="text, blurry, fuzziness", lines=1, elem_id="negative-prompt-text-input")
|
229 |
image_style = gr.Dropdown(label="Style", choices=["None style", "Cinematic", "Digital Art", "Portrait"], value="None style", allow_custom_value=False)
|
230 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
text_button.click(generate_txt2img, inputs=[current_model, text_prompt, negative_prompt, image_style], outputs=image_output)
|
232 |
demo.load(get_params, None, current_model)
|
233 |
|
|
|
212 |
|
213 |
with gr.Row(elem_id="prompt-container"):
|
214 |
with gr.Column():
|
215 |
+
btn_refresh = gr.Button(value="Refresh to get current deployed models")
|
|
|
|
|
216 |
btn_refresh.click(None, js="window.location.reload()")
|
217 |
+
current_model = gr.Dropdown(label="Current Model", choices=list_models, value=list_models[0])
|
218 |
|
219 |
with gr.Row(elem_id="prompt-container"):
|
220 |
text_prompt = gr.Textbox(label="Prompt", placeholder="a cute dog", value = "a lovely cat", lines=1, elem_id="prompt-text-input")
|
|
|
227 |
negative_prompt = gr.Textbox(label="Negative Prompt", value="text, blurry, fuzziness", lines=1, elem_id="negative-prompt-text-input")
|
228 |
image_style = gr.Dropdown(label="Style", choices=["None style", "Cinematic", "Digital Art", "Portrait"], value="None style", allow_custom_value=False)
|
229 |
|
230 |
+
with gr.Row():
|
231 |
+
gr.Examples(
|
232 |
+
[
|
233 |
+
"Chinese ink painting",
|
234 |
+
"silk road",
|
235 |
+
"masterpiece, best quality, 1girl, solo, crop top, denim shorts, choker, (graffiti:1.5), paint splatter, arms behind back, against wall, looking at viewer, armband, thigh strap, paint on body, head tilt, bored, multicolored hair, aqua eyes, headset,",
|
236 |
+
"beautiful home",
|
237 |
+
"interior design of living room",
|
238 |
+
"1girl, aqua eyes, baseball cap, blonde hair, closed mouth, earrings, green background, hat, hoop earrings, jewelry, looking at viewer, shirt, short hair, simple background, solo, upper body, yellow shirt",
|
239 |
+
],
|
240 |
+
inputs = text_prompt,
|
241 |
+
label = "Prompt Examples"
|
242 |
+
)
|
243 |
+
|
244 |
text_button.click(generate_txt2img, inputs=[current_model, text_prompt, negative_prompt, image_style], outputs=image_output)
|
245 |
demo.load(get_params, None, current_model)
|
246 |
|