Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -30,9 +30,7 @@ def search_mongo(search_query):
|
|
30 |
object = mongo_search(search_query)
|
31 |
return object[0]['makeModel'], object[0]['photoUrls'], \
|
32 |
object[1]['makeModel'], object[1]['photoUrls'], \
|
33 |
-
object[2]['makeModel'], object[2]['photoUrls']
|
34 |
-
object[3]['makeModel'], object[3]['photoUrls']
|
35 |
-
|
36 |
|
37 |
|
38 |
def search_img(image):
|
@@ -59,10 +57,6 @@ with gr.Blocks() as demo:
|
|
59 |
text_output_img_3 = gr.Gallery(height=300, selected_index=0)
|
60 |
text_output_text_3 = gr.Textbox(label='Output car model', show_label=True)
|
61 |
|
62 |
-
with gr.Column():
|
63 |
-
text_output_img_4 = gr.Gallery(visible=False)
|
64 |
-
text_output_text_4 = gr.Textbox(label='Output car model', show_label=True, visible=False)
|
65 |
-
|
66 |
text_input_text = gr.Textbox(label='Search Query', show_label=True)
|
67 |
text_btn = gr.Button()
|
68 |
|
@@ -81,8 +75,7 @@ with gr.Blocks() as demo:
|
|
81 |
inputs=text_input_text,
|
82 |
outputs=[text_output_text_1, text_output_img_1,
|
83 |
text_output_text_2, text_output_img_2,
|
84 |
-
text_output_text_3, text_output_img_3
|
85 |
-
text_output_text_4, text_output_img_4])
|
86 |
|
87 |
|
88 |
|
|
|
30 |
object = mongo_search(search_query)
|
31 |
return object[0]['makeModel'], object[0]['photoUrls'], \
|
32 |
object[1]['makeModel'], object[1]['photoUrls'], \
|
33 |
+
object[2]['makeModel'], object[2]['photoUrls']
|
|
|
|
|
34 |
|
35 |
|
36 |
def search_img(image):
|
|
|
57 |
text_output_img_3 = gr.Gallery(height=300, selected_index=0)
|
58 |
text_output_text_3 = gr.Textbox(label='Output car model', show_label=True)
|
59 |
|
|
|
|
|
|
|
|
|
60 |
text_input_text = gr.Textbox(label='Search Query', show_label=True)
|
61 |
text_btn = gr.Button()
|
62 |
|
|
|
75 |
inputs=text_input_text,
|
76 |
outputs=[text_output_text_1, text_output_img_1,
|
77 |
text_output_text_2, text_output_img_2,
|
78 |
+
text_output_text_3, text_output_img_3])
|
|
|
79 |
|
80 |
|
81 |
|