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