Update app.py
Browse files
app.py
CHANGED
@@ -214,8 +214,9 @@ with gr.Blocks() as demo:
|
|
214 |
img_data = f"data:image/png;base64,{img_str}"
|
215 |
datasets[current_dataset_name].append({'image': img_data, 'prompt': prompt})
|
216 |
dataset = datasets[current_dataset_name]
|
217 |
-
# Reset page number to 0
|
218 |
page_number = 0
|
|
|
219 |
html_content = display_dataset_html(dataset, page_number=page_number)
|
220 |
return datasets, page_number, gr.update(value=html_content), f"Entry added to dataset '{current_dataset_name}'."
|
221 |
|
|
|
214 |
img_data = f"data:image/png;base64,{img_str}"
|
215 |
datasets[current_dataset_name].append({'image': img_data, 'prompt': prompt})
|
216 |
dataset = datasets[current_dataset_name]
|
217 |
+
# Reset page number to 0 and refresh HTML
|
218 |
page_number = 0
|
219 |
+
dataset = datasets[current_dataset_name]
|
220 |
html_content = display_dataset_html(dataset, page_number=page_number)
|
221 |
return datasets, page_number, gr.update(value=html_content), f"Entry added to dataset '{current_dataset_name}'."
|
222 |
|