refactor: uncomment and enable next image button and image dropdown in the interface
Browse files
app.py
CHANGED
|
@@ -214,11 +214,11 @@ def build_interface() -> gr.Blocks:
|
|
| 214 |
image_info = gr.Markdown(
|
| 215 |
f"**Bild-ID:** {initial_entry.image_id}" if initial_entry else "Kein Bild geladen."
|
| 216 |
)
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
with gr.Column(scale=2):
|
| 223 |
username_input = gr.Textbox(
|
| 224 |
label="Benutzername",
|
|
@@ -255,13 +255,13 @@ def build_interface() -> gr.Blocks:
|
|
| 255 |
interactive=False,
|
| 256 |
wrap=True,
|
| 257 |
)
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
image_df = gr.Dataframe(
|
| 266 |
headers=LEADERBOARD_HEADERS,
|
| 267 |
value=image_rows,
|
|
|
|
| 214 |
image_info = gr.Markdown(
|
| 215 |
f"**Bild-ID:** {initial_entry.image_id}" if initial_entry else "Kein Bild geladen."
|
| 216 |
)
|
| 217 |
+
next_button = gr.Button(
|
| 218 |
+
"Nächstes Bild",
|
| 219 |
+
variant="secondary",
|
| 220 |
+
interactive=bool(IMAGE_ENTRIES),
|
| 221 |
+
)
|
| 222 |
with gr.Column(scale=2):
|
| 223 |
username_input = gr.Textbox(
|
| 224 |
label="Benutzername",
|
|
|
|
| 255 |
interactive=False,
|
| 256 |
wrap=True,
|
| 257 |
)
|
| 258 |
+
with gr.Tab("Dieses Bild Top 50"):
|
| 259 |
+
image_dropdown = gr.Dropdown(
|
| 260 |
+
choices=image_choices,
|
| 261 |
+
value=initial_entry.image_id if initial_entry else None,
|
| 262 |
+
label="Bild auswählen",
|
| 263 |
+
interactive=bool(image_choices),
|
| 264 |
+
)
|
| 265 |
image_df = gr.Dataframe(
|
| 266 |
headers=LEADERBOARD_HEADERS,
|
| 267 |
value=image_rows,
|