Update frontend/gradio_app.py
Browse files- frontend/gradio_app.py +5 -9
frontend/gradio_app.py
CHANGED
@@ -45,16 +45,12 @@ def create_gradio_interface():
|
|
45 |
)
|
46 |
|
47 |
|
48 |
-
|
49 |
-
with gr.Tab("Jewelry Recommender"):
|
50 |
-
gr.Markdown("# Jewelry Recommendation System")
|
51 |
-
gr.Markdown("Upload an image or select a reference image to get recommendations.")
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
|
59 |
|
60 |
with gr.Tab("Image URL"):
|
|
|
45 |
)
|
46 |
|
47 |
|
|
|
|
|
|
|
|
|
48 |
|
49 |
+
with gr.Tab("Reference Images"):
|
50 |
+
gr.Markdown("### Select a reference image to test:")
|
51 |
+
gallery = gr.Gallery(value=reference_images, label="Reference Images",height=150,width=150).style(grid=[3], container=True, item_style="border-radius: 10px; transition: transform 0.2s;") # Display 3 images per row
|
52 |
+
gallery_output = gr.HTML(label="Recommendations")
|
53 |
+
gallery.select(InputHandlers.process_image, inputs=[gallery, num_recs_slider, skip_exact], outputs=gallery_output)
|
54 |
|
55 |
|
56 |
with gr.Tab("Image URL"):
|