Update app.py
Browse files
app.py
CHANGED
@@ -43,7 +43,7 @@ def compare_embeddings(*texts):
|
|
43 |
return fig
|
44 |
|
45 |
def generate_text_boxes(n):
|
46 |
-
return [gr.Textbox(label=f"Text {i+1}") for i in range(
|
47 |
|
48 |
with gr.Blocks() as iface:
|
49 |
gr.Markdown("# 3D Embedding Comparison")
|
@@ -59,7 +59,7 @@ with gr.Blocks() as iface:
|
|
59 |
compare_button = gr.Button("Compare Embeddings")
|
60 |
|
61 |
def update_interface(n):
|
62 |
-
return [gr.
|
63 |
|
64 |
num_texts.change(
|
65 |
update_interface,
|
|
|
43 |
return fig
|
44 |
|
45 |
def generate_text_boxes(n):
|
46 |
+
return [gr.Textbox(label=f"Text {i+1}", visible=(i < n)) for i in range(10)]
|
47 |
|
48 |
with gr.Blocks() as iface:
|
49 |
gr.Markdown("# 3D Embedding Comparison")
|
|
|
59 |
compare_button = gr.Button("Compare Embeddings")
|
60 |
|
61 |
def update_interface(n):
|
62 |
+
return [gr.update(visible=(i < n)) for i in range(10)]
|
63 |
|
64 |
num_texts.change(
|
65 |
update_interface,
|