zenafey commited on
Commit
0e59796
1 Parent(s): 636aec9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -98,8 +98,8 @@ def remove_id_and_ext(text):
98
  text = text[:-4]
99
  return text
100
 
101
- def random_get():
102
- return str(random.randint(1, 10))
103
 
104
  def create_grid(image_urls):
105
  # Download first image to get size
@@ -335,8 +335,8 @@ with gr.Blocks(css=css) as demo:
335
  with gr.Tab("Lora"):
336
  loralist = prodia_client.list_loras()
337
  for lora in loralist:
338
- random_btn = gr.Button(lora)
339
- random_btn.click(random_get, outputs=prompt)
340
 
341
  with gr.Column(scale=2):
342
  image_output = gr.Gallery(value=["https://images.prodia.xyz/8ede1a7c-c0ee-4ded-987d-6ffed35fc477.png"], preview=True)
 
98
  text = text[:-4]
99
  return text
100
 
101
+ def place_lora(lorabtn):
102
+ return lorabtn
103
 
104
  def create_grid(image_urls):
105
  # Download first image to get size
 
335
  with gr.Tab("Lora"):
336
  loralist = prodia_client.list_loras()
337
  for lora in loralist:
338
+ lora_btn = gr.Button(lora)
339
+ lora_btn.click(place_lora, inputs=[lora_btn], outputs=prompt)
340
 
341
  with gr.Column(scale=2):
342
  image_output = gr.Gallery(value=["https://images.prodia.xyz/8ede1a7c-c0ee-4ded-987d-6ffed35fc477.png"], preview=True)