Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -98,6 +98,8 @@ def remove_id_and_ext(text):
|
|
98 |
text = text[:-4]
|
99 |
return text
|
100 |
|
|
|
|
|
101 |
|
102 |
def create_grid(image_urls):
|
103 |
# Download first image to get size
|
@@ -334,7 +336,7 @@ with gr.Blocks(css=css) as demo:
|
|
334 |
loralist = prodia_client.list_loras()
|
335 |
for lora in loralist:
|
336 |
random_btn = gr.Button(lora)
|
337 |
-
random_btn.click(
|
338 |
|
339 |
with gr.Column(scale=2):
|
340 |
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 random_get():
|
102 |
+
return str(random.randint(1, 10))
|
103 |
|
104 |
def create_grid(image_urls):
|
105 |
# Download first image to get size
|
|
|
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)
|