Spaces:
Runtime error
Runtime error
updated gallery display, removed prompt o/p
Browse files
app.py
CHANGED
@@ -118,14 +118,14 @@ with gr.Blocks(css = """#label_mid {padding-top: 2px; padding-bottom: 2px;}
|
|
118 |
search_query = gr.Textbox(placeholder="Example: A small cat sitting", label="", elem_id="search_query", value='')
|
119 |
label_results = gr.HTML(value= "<p style='text-align: center; color: blue; font-weight: bold;'>👇These Search results are from PlaygroundAI 'Liked_Images' dataset available on <a href='https://github.com/playgroundai/liked_images' _target='blank'>github</a></center></p>", elem_id="label_results")
|
120 |
img_search = gr.HTML(label = 'Image search results from PlaygroundAI dataset', elem_id="img_search")
|
121 |
-
pai_prompt = gr.Textbox(label="Image prompt from PlaygroundAI dataset", elem_id="pai_prompt")
|
122 |
#b1 = gr.Button("Retry").style(full_width=False)
|
123 |
|
124 |
gr.HTML('''<center><a href="https://huggingface.co/spaces/ysharma/Blip_PlaygroundAI?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a></center>
|
125 |
</p></div>''')
|
126 |
|
127 |
-
image_in.change(Image_similarity_search, [image_in, search_query], [
|
128 |
-
search_query.submit(Image_similarity_search, [image_in, search_query], [
|
129 |
#b1.click(Image_similarity_search, [image_in, search_query], [pai_prompt, img_search] )
|
130 |
|
131 |
demo.launch(debug=True)
|
|
|
118 |
search_query = gr.Textbox(placeholder="Example: A small cat sitting", label="", elem_id="search_query", value='')
|
119 |
label_results = gr.HTML(value= "<p style='text-align: center; color: blue; font-weight: bold;'>👇These Search results are from PlaygroundAI 'Liked_Images' dataset available on <a href='https://github.com/playgroundai/liked_images' _target='blank'>github</a></center></p>", elem_id="label_results")
|
120 |
img_search = gr.HTML(label = 'Image search results from PlaygroundAI dataset', elem_id="img_search")
|
121 |
+
#pai_prompt = gr.Textbox(label="Image prompt from PlaygroundAI dataset", elem_id="pai_prompt")
|
122 |
#b1 = gr.Button("Retry").style(full_width=False)
|
123 |
|
124 |
gr.HTML('''<center><a href="https://huggingface.co/spaces/ysharma/Blip_PlaygroundAI?duplicate=true"><img src="https://bit.ly/3gLdBN6" alt="Duplicate Space"></a></center>
|
125 |
</p></div>''')
|
126 |
|
127 |
+
image_in.change(Image_similarity_search, [image_in, search_query], [img_search], api_name="PlaygroundAI_image_search" )
|
128 |
+
search_query.submit(Image_similarity_search, [image_in, search_query], [img_search], api_name='PlaygroundAI_text_search' )
|
129 |
#b1.click(Image_similarity_search, [image_in, search_query], [pai_prompt, img_search] )
|
130 |
|
131 |
demo.launch(debug=True)
|