sand74 commited on
Commit
e9db8af
·
verified ·
1 Parent(s): da56f16

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -15
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
- with gr.Group(visible=True):
160
- model_id = gr.Dropdown(model_names, value=model_names[0], label="Select model")
161
-
162
- with gr.Row():
163
- prompt = gr.Text(
164
- label="Prompt",
165
- show_label=False,
166
- max_lines=1,
167
- placeholder="Enter your prompt",
168
- container=False,
169
- value='changpu_hw plaing with ball',
170
- )
171
- run_button = gr.Button("Run", scale=0, variant="primary")
172
-
173
- result = gr.Image(label="Result", show_label=False, type="pil")
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")