Update app.py
Browse files
app.py
CHANGED
@@ -217,6 +217,7 @@ head = """
|
|
217 |
"""
|
218 |
|
219 |
output = gr.Gallery(label="Found Images", columns=[4], object_fit="contain", height="auto", interactive=False)
|
|
|
220 |
|
221 |
def init_ui():
|
222 |
return gr.update(visible=True), gr.update(visible=False)
|
@@ -224,6 +225,9 @@ def init_ui():
|
|
224 |
def search_ui():
|
225 |
return gr.update(visible=False), gr.update(visible=True)
|
226 |
|
|
|
|
|
|
|
227 |
with gr.Blocks(css=custom_css, head=head, delete_cache=(3600, 3600)) as demo:
|
228 |
gr.Markdown(
|
229 |
"""
|
@@ -239,9 +243,9 @@ with gr.Blocks(css=custom_css, head=head, delete_cache=(3600, 3600)) as demo:
|
|
239 |
gr.HTML("<a href='https://faceonlive.pocketsflow.com/checkout?productId=676c15b1971244a587ca07cb' target='_blank' style='font-size: 16px;'>Get Premium Token: Deep Search Including Social Media & Full URL Reveal</a>")
|
240 |
gr.HTML("<a href='https://faceonlive.pocketsflow.com/checkout?productId=676d7e7597f8b3b699f84820' target='_blank' style='font-size: 16px;'>Protect Your Privacy β Start Your Takedown Now</a>")
|
241 |
search_face_button = gr.Button("Search Face")
|
242 |
-
gr.Examples(['examples/1.jpg', 'examples/2.jpg'], inputs=image, cache_examples=True, cache_mode='
|
243 |
|
244 |
-
with
|
245 |
gr.Markdown("> ### **β οΈ Reminder:** Export images before refreshing the page by clicking the 'Export Images' button.")
|
246 |
output.render()
|
247 |
with gr.Row():
|
|
|
217 |
"""
|
218 |
|
219 |
output = gr.Gallery(label="Found Images", columns=[4], object_fit="contain", height="auto", interactive=False)
|
220 |
+
col2 = gr.Column(scale=2, visible=False)
|
221 |
|
222 |
def init_ui():
|
223 |
return gr.update(visible=True), gr.update(visible=False)
|
|
|
225 |
def search_ui():
|
226 |
return gr.update(visible=False), gr.update(visible=True)
|
227 |
|
228 |
+
def search_face_examples(image):
|
229 |
+
return search_face(image), gr.update(visible=False), gr.update(visible=True)
|
230 |
+
|
231 |
with gr.Blocks(css=custom_css, head=head, delete_cache=(3600, 3600)) as demo:
|
232 |
gr.Markdown(
|
233 |
"""
|
|
|
243 |
gr.HTML("<a href='https://faceonlive.pocketsflow.com/checkout?productId=676c15b1971244a587ca07cb' target='_blank' style='font-size: 16px;'>Get Premium Token: Deep Search Including Social Media & Full URL Reveal</a>")
|
244 |
gr.HTML("<a href='https://faceonlive.pocketsflow.com/checkout?productId=676d7e7597f8b3b699f84820' target='_blank' style='font-size: 16px;'>Protect Your Privacy β Start Your Takedown Now</a>")
|
245 |
search_face_button = gr.Button("Search Face")
|
246 |
+
gr.Examples(['examples/1.jpg', 'examples/2.jpg'], inputs=image, cache_examples=True, cache_mode='eager', fn=search_face_examples, outputs=[output, col1, col2])
|
247 |
|
248 |
+
with col2.render():
|
249 |
gr.Markdown("> ### **β οΈ Reminder:** Export images before refreshing the page by clicking the 'Export Images' button.")
|
250 |
output.render()
|
251 |
with gr.Row():
|