Update app.py
Browse files
app.py
CHANGED
|
@@ -152,25 +152,26 @@ css = """
|
|
| 152 |
}
|
| 153 |
"""
|
| 154 |
|
|
|
|
| 155 |
|
| 156 |
with gr.Blocks(css=css) as demo:
|
| 157 |
with gr.Column(elem_id="col-container"):
|
| 158 |
title = gr.Markdown(" # Text-to-Image Gradio Template")
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
|
| 175 |
with gr.Group(visible=True) as lora_section:
|
| 176 |
title = gr.Markdown(" ### LoRA section")
|
|
|
|
| 152 |
}
|
| 153 |
"""
|
| 154 |
|
| 155 |
+
result = None
|
| 156 |
|
| 157 |
with gr.Blocks(css=css) as demo:
|
| 158 |
with gr.Column(elem_id="col-container"):
|
| 159 |
title = gr.Markdown(" # Text-to-Image Gradio Template")
|
| 160 |
+
|
| 161 |
+
model_id = gr.Dropdown(model_names, value=model_names[0], label="Select model")
|
| 162 |
+
|
| 163 |
+
with gr.Row():
|
| 164 |
+
prompt = gr.Text(
|
| 165 |
+
label="Prompt",
|
| 166 |
+
show_label=False,
|
| 167 |
+
max_lines=1,
|
| 168 |
+
placeholder="Enter your prompt",
|
| 169 |
+
container=False,
|
| 170 |
+
value='changpu_hw plaing with ball',
|
| 171 |
+
)
|
| 172 |
+
run_button = gr.Button("Run", scale=0, variant="primary")
|
| 173 |
+
|
| 174 |
+
result = gr.Image(label="Result", show_label=False, type="pil")
|
| 175 |
|
| 176 |
with gr.Group(visible=True) as lora_section:
|
| 177 |
title = gr.Markdown(" ### LoRA section")
|