svjack commited on
Commit
bb028a7
·
1 Parent(s): 0811b06

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,7 +11,7 @@ dataset = load_dataset("Gustavosta/Stable-Diffusion-Prompts")
11
  prompt_df = dataset["train"].to_pandas()
12
 
13
  def get_samples():
14
- prompt_list = prompt_df.sample(n = 5)["Prompt"].map(lambda x: [x]).values.tolist()
15
  return prompt_list
16
 
17
  def get_params(request: gr.Request):
@@ -241,7 +241,6 @@ with gr.Blocks(css=css) as demo:
241
 
242
  with gr.Row():
243
  with gr.Column():
244
- '''
245
  exps = gr.Examples(
246
  get_samples(),
247
  inputs = text_prompt,
@@ -256,6 +255,7 @@ with gr.Blocks(css=css) as demo:
256
  )
257
  exp_refresh = gr.Button(value="Click Refresh to get newly prompt examples")
258
  exp_refresh.click(get_samples, None, exps)
 
259
 
260
  text_button.click(generate_txt2img, inputs=[current_model, text_prompt, negative_prompt, image_style], outputs=image_output)
261
  exps.select(lambda x: x[0], exps, text_prompt)
 
11
  prompt_df = dataset["train"].to_pandas()
12
 
13
  def get_samples():
14
+ prompt_list = prompt_df.sample(n = 5)["Prompt"].map(lambda x: x).values.tolist()
15
  return prompt_list
16
 
17
  def get_params(request: gr.Request):
 
241
 
242
  with gr.Row():
243
  with gr.Column():
 
244
  exps = gr.Examples(
245
  get_samples(),
246
  inputs = text_prompt,
 
255
  )
256
  exp_refresh = gr.Button(value="Click Refresh to get newly prompt examples")
257
  exp_refresh.click(get_samples, None, exps)
258
+ '''
259
 
260
  text_button.click(generate_txt2img, inputs=[current_model, text_prompt, negative_prompt, image_style], outputs=image_output)
261
  exps.select(lambda x: x[0], exps, text_prompt)