Spaces:
Running
on
Zero
Running
on
Zero
gradio
Browse files- after.jpg +3 -0
- app.py +27 -4
- before.jpg +3 -0
after.jpg
ADDED
![]() |
Git LFS Details
|
app.py
CHANGED
@@ -276,15 +276,15 @@ if __name__ == "__main__":
|
|
276 |
# Start your Gradio app
|
277 |
css_code = """
|
278 |
#fixed-image-size {
|
279 |
-
max-width:
|
280 |
-
max-height:
|
281 |
}
|
282 |
|
283 |
/* Use smaller max sizes on mobile */
|
284 |
@media (max-width: 768px) {
|
285 |
#fixed-image-size {
|
286 |
-
max-width:
|
287 |
-
max-height:
|
288 |
}
|
289 |
}
|
290 |
"""
|
@@ -295,6 +295,20 @@ if __name__ == "__main__":
|
|
295 |
Anonymize your group photos using Vance Blurring!
|
296 |
""")
|
297 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
298 |
with gr.Accordion("More info", open=False):
|
299 |
gr.Markdown(
|
300 |
"""
|
@@ -332,5 +346,14 @@ if __name__ == "__main__":
|
|
332 |
|
333 |
# Trigger your blur function
|
334 |
submit_btn.click(fn=advance_blur, inputs=[input_image], outputs=[output_image])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
335 |
|
336 |
app.launch(share=True)
|
|
|
276 |
# Start your Gradio app
|
277 |
css_code = """
|
278 |
#fixed-image-size {
|
279 |
+
max-width: 600px !important; /* fix the width of image */
|
280 |
+
max-height: 600px !important; /* fix the height of image */
|
281 |
}
|
282 |
|
283 |
/* Use smaller max sizes on mobile */
|
284 |
@media (max-width: 768px) {
|
285 |
#fixed-image-size {
|
286 |
+
max-width: 320px !important;
|
287 |
+
max-height: 320px !important;
|
288 |
}
|
289 |
}
|
290 |
"""
|
|
|
295 |
Anonymize your group photos using Vance Blurring!
|
296 |
""")
|
297 |
|
298 |
+
with gr.Row():
|
299 |
+
gr.Image(
|
300 |
+
value="before.jpg",
|
301 |
+
label="Before",
|
302 |
+
show_label=True,
|
303 |
+
interactive=False
|
304 |
+
)
|
305 |
+
gr.Image(
|
306 |
+
value="after.jpg",
|
307 |
+
label="After",
|
308 |
+
show_label=True,
|
309 |
+
interactive=False
|
310 |
+
)
|
311 |
+
|
312 |
with gr.Accordion("More info", open=False):
|
313 |
gr.Markdown(
|
314 |
"""
|
|
|
346 |
|
347 |
# Trigger your blur function
|
348 |
submit_btn.click(fn=advance_blur, inputs=[input_image], outputs=[output_image])
|
349 |
+
# Add a Gradio Examples section to let users see a sample run
|
350 |
+
|
351 |
+
gr.Examples(
|
352 |
+
examples=[["before.jpg"]], # <-- Update with a real test image path
|
353 |
+
inputs=[input_image],
|
354 |
+
outputs=[output_image],
|
355 |
+
fn=advance_blur,
|
356 |
+
run_on_click=True,
|
357 |
+
)
|
358 |
|
359 |
app.launch(share=True)
|
before.jpg
ADDED
![]() |
Git LFS Details
|