Spaces:
Running
Running
fix
Browse files
app.py
CHANGED
@@ -385,6 +385,11 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
385 |
|
386 |
performance_plot = gr.Plot(label="Performance Metrics")
|
387 |
|
|
|
|
|
|
|
|
|
|
|
388 |
def get_recent_gallery_items():
|
389 |
gallery_items = []
|
390 |
for r in reversed(recent_generations):
|
@@ -395,16 +400,6 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
395 |
(r["hidream-full"], f"HiDream-full: {r['prompt']}"))
|
396 |
return gallery_items
|
397 |
|
398 |
-
with gr.Accordion("Recent Generations (last 16)", open=False):
|
399 |
-
recent_gallery = gr.Gallery(get_recent_gallery_items(),
|
400 |
-
label="Prompt and Output",
|
401 |
-
columns=3,
|
402 |
-
interactive=False)
|
403 |
-
|
404 |
-
recent_gallery.change(lambda ex: ex,
|
405 |
-
inputs=[recent_gallery],
|
406 |
-
outputs=[])
|
407 |
-
|
408 |
def update_recent_gallery(prompt, results):
|
409 |
recent_generations.append({
|
410 |
"prompt": prompt,
|
|
|
385 |
|
386 |
performance_plot = gr.Plot(label="Performance Metrics")
|
387 |
|
388 |
+
with gr.Accordion("Recent Generations (last 16)", open=False):
|
389 |
+
recent_gallery = gr.Gallery(label="Prompt and Output",
|
390 |
+
columns=3,
|
391 |
+
interactive=False)
|
392 |
+
|
393 |
def get_recent_gallery_items():
|
394 |
gallery_items = []
|
395 |
for r in reversed(recent_generations):
|
|
|
400 |
(r["hidream-full"], f"HiDream-full: {r['prompt']}"))
|
401 |
return gallery_items
|
402 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
403 |
def update_recent_gallery(prompt, results):
|
404 |
recent_generations.append({
|
405 |
"prompt": prompt,
|