Spaces:
Running
Running
BoltzmannEntropy
commited on
Commit
•
2ed398f
1
Parent(s):
c27c049
reaeme
Browse files
app.py
CHANGED
@@ -292,6 +292,9 @@ def run_inference(model_names, dataset_input, num_images_input, prompts, device_
|
|
292 |
|
293 |
return pd.DataFrame(data).to_html(escape=False)
|
294 |
|
|
|
|
|
|
|
295 |
# Gradio UI setup
|
296 |
def create_gradio_interface():
|
297 |
css = """
|
@@ -312,6 +315,18 @@ def create_gradio_interface():
|
|
312 |
# image_path = os.path.abspath("static/image.jpg")
|
313 |
# gr.Image(value=image_path, label="HF Image", width=300, height=300)
|
314 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
with gr.Tab("VLM model and Dataset selection"):
|
316 |
gr.Markdown("### Dataset Selection: HF or from a ZIP file.")
|
317 |
with gr.Accordion("Advanced Settings", open=True):
|
|
|
292 |
|
293 |
return pd.DataFrame(data).to_html(escape=False)
|
294 |
|
295 |
+
def show_image(image):
|
296 |
+
return image # Simply display the selected image
|
297 |
+
|
298 |
# Gradio UI setup
|
299 |
def create_gradio_interface():
|
300 |
css = """
|
|
|
315 |
# image_path = os.path.abspath("static/image.jpg")
|
316 |
# gr.Image(value=image_path, label="HF Image", width=300, height=300)
|
317 |
|
318 |
+
init_image = gr.Image(label="Selected Image", type="filepath")
|
319 |
+
|
320 |
+
# Use gr.Examples to showcase a set of example images
|
321 |
+
gr.Examples(
|
322 |
+
examples=[
|
323 |
+
["static/image.jpg"],
|
324 |
+
],
|
325 |
+
inputs=[init_image],
|
326 |
+
label="Example Images"
|
327 |
+
)
|
328 |
+
init_image.change(show_image, inputs=init_image, outputs=init_image)
|
329 |
+
|
330 |
with gr.Tab("VLM model and Dataset selection"):
|
331 |
gr.Markdown("### Dataset Selection: HF or from a ZIP file.")
|
332 |
with gr.Accordion("Advanced Settings", open=True):
|