Spaces:
Running
Running
Sadjad Alikhani
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -28,15 +28,16 @@ with gr.Blocks() as demo:
|
|
28 |
gr.Markdown("# Raw vs. Embeddings Inference Results")
|
29 |
gr.Markdown("Select a data percentage and task complexity to view the corresponding inference result for raw channels and embeddings.")
|
30 |
|
31 |
-
#
|
32 |
-
with gr.
|
33 |
-
|
34 |
-
|
|
|
35 |
|
36 |
-
# Outputs (display the images side by side)
|
37 |
with gr.Row():
|
38 |
-
raw_img = gr.Image(label="Raw Channels", type="pil", interactive=False)
|
39 |
-
embeddings_img = gr.Image(label="Embeddings", type="pil", interactive=False)
|
40 |
|
41 |
# Trigger image updates when inputs change
|
42 |
percentage_dropdown.change(fn=display_images, inputs=[percentage_dropdown, complexity_radio], outputs=[raw_img, embeddings_img])
|
|
|
28 |
gr.Markdown("# Raw vs. Embeddings Inference Results")
|
29 |
gr.Markdown("Select a data percentage and task complexity to view the corresponding inference result for raw channels and embeddings.")
|
30 |
|
31 |
+
# Add scrollable area for configurations
|
32 |
+
with gr.Scroll(height=150): # Scrollable area for the configurations
|
33 |
+
with gr.Row():
|
34 |
+
percentage_dropdown = gr.Dropdown(data_percentage_options, label="Percentage of Data for Training", value=10)
|
35 |
+
complexity_radio = gr.Radio(task_complexity_options, label="Task Complexity", value=16)
|
36 |
|
37 |
+
# Outputs (display the images side by side and set a smaller size for the images)
|
38 |
with gr.Row():
|
39 |
+
raw_img = gr.Image(label="Raw Channels", type="pil", width=300, height=300, interactive=False) # Smaller image size
|
40 |
+
embeddings_img = gr.Image(label="Embeddings", type="pil", width=300, height=300, interactive=False) # Smaller image size
|
41 |
|
42 |
# Trigger image updates when inputs change
|
43 |
percentage_dropdown.change(fn=display_images, inputs=[percentage_dropdown, complexity_radio], outputs=[raw_img, embeddings_img])
|