model2 commited on
Commit
a92c609
·
1 Parent(s): 276f9da
Files changed (3) hide show
  1. after.jpg +3 -0
  2. app.py +27 -4
  3. before.jpg +3 -0
after.jpg ADDED

Git LFS Details

  • SHA256: 76bde291fe21ee8ab4cbeae880ef770b33b8d5f800fbe2d77cedad83036ed363
  • Pointer size: 130 Bytes
  • Size of remote file: 72 kB
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: 500px !important; /* fix the width of image */
280
- max-height: 500px !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: 300px !important;
287
- max-height: 300px !important;
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

  • SHA256: 9027ca1eff40986e16f2a1d1da2a6ea976bae29ff2d328cae555dc048057b5f6
  • Pointer size: 130 Bytes
  • Size of remote file: 93.5 kB