Update app.py
Browse files
app.py
CHANGED
@@ -42,22 +42,24 @@ def gradio_interface(query_text):
|
|
42 |
search_results = search_query(query_text)
|
43 |
return search_results
|
44 |
|
45 |
-
# Gradio interface setup
|
46 |
with gr.Blocks() as app:
|
47 |
gr.Markdown("<h1>White Stride Red Search (GTE-Qwen2)</h1>")
|
48 |
|
49 |
-
#
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
# Output table for displaying results
|
53 |
search_output = gr.DataFrame(label="Search Results")
|
54 |
|
55 |
-
# Search button
|
56 |
-
search_button = gr.Button("Search")
|
57 |
-
|
58 |
# Link button click to action
|
59 |
search_button.click(fn=gradio_interface, inputs=search_input, outputs=search_output)
|
60 |
|
|
|
61 |
# Launch the Gradio app
|
62 |
app.launch()
|
63 |
|
|
|
42 |
search_results = search_query(query_text)
|
43 |
return search_results
|
44 |
|
|
|
45 |
with gr.Blocks() as app:
|
46 |
gr.Markdown("<h1>White Stride Red Search (GTE-Qwen2)</h1>")
|
47 |
|
48 |
+
# Row to align the text box and button horizontally
|
49 |
+
with gr.Row():
|
50 |
+
# Input text box for the search query
|
51 |
+
search_input = gr.Textbox(label="Search Query", placeholder="Enter search text", interactive=True)
|
52 |
+
|
53 |
+
# Search button next to the text box
|
54 |
+
search_button = gr.Button("Search")
|
55 |
|
56 |
# Output table for displaying results
|
57 |
search_output = gr.DataFrame(label="Search Results")
|
58 |
|
|
|
|
|
|
|
59 |
# Link button click to action
|
60 |
search_button.click(fn=gradio_interface, inputs=search_input, outputs=search_output)
|
61 |
|
62 |
+
|
63 |
# Launch the Gradio app
|
64 |
app.launch()
|
65 |
|