csuhan commited on
Commit
eaf0661
·
1 Parent(s): 96f8446

Upload folder using huggingface_hub

Browse files
Files changed (49) hide show
  1. app.py +8 -7
  2. examples/depth_normal/depth/0084.png +0 -0
  3. examples/depth_normal/depth/0131.png +0 -0
  4. examples/depth_normal/depth/0297.png +0 -0
  5. examples/depth_normal/depth/0633.png +0 -0
  6. examples/depth_normal/depth/0663.png +0 -0
  7. examples/depth_normal/depth/0771.png +0 -0
  8. examples/depth_normal/depth/0782.png +0 -0
  9. examples/depth_normal/depth/1001.png +0 -0
  10. examples/depth_normal/depth/1051.png +0 -0
  11. examples/depth_normal/depth/1129.png +0 -0
  12. examples/depth_normal/depth/1205.png +0 -0
  13. examples/depth_normal/depth/1336.png +0 -0
  14. examples/depth_normal/depth/1383.png +0 -0
  15. examples/depth_normal/depth/1386.png +0 -0
  16. examples/depth_normal/depth/1393.png +0 -0
  17. examples/depth_normal/depth/1447.png +0 -0
  18. examples/depth_normal/normal/0084.png +0 -0
  19. examples/depth_normal/normal/0131.png +0 -0
  20. examples/depth_normal/normal/0297.png +0 -0
  21. examples/depth_normal/normal/0633.png +0 -0
  22. examples/depth_normal/normal/0663.png +0 -0
  23. examples/depth_normal/normal/0771.png +0 -0
  24. examples/depth_normal/normal/0782.png +0 -0
  25. examples/depth_normal/normal/1001.png +0 -0
  26. examples/depth_normal/normal/1051.png +0 -0
  27. examples/depth_normal/normal/1129.png +0 -0
  28. examples/depth_normal/normal/1205.png +0 -0
  29. examples/depth_normal/normal/1336.png +0 -0
  30. examples/depth_normal/normal/1383.png +0 -0
  31. examples/depth_normal/normal/1386.png +0 -0
  32. examples/depth_normal/normal/1393.png +0 -0
  33. examples/depth_normal/normal/1447.png +0 -0
  34. examples/depth_normal/rgb/0084.png +0 -0
  35. examples/depth_normal/rgb/0131.png +0 -0
  36. examples/depth_normal/rgb/0297.png +0 -0
  37. examples/depth_normal/rgb/0633.png +0 -0
  38. examples/depth_normal/rgb/0663.png +0 -0
  39. examples/depth_normal/rgb/0771.png +0 -0
  40. examples/depth_normal/rgb/0782.png +0 -0
  41. examples/depth_normal/rgb/1001.png +0 -0
  42. examples/depth_normal/rgb/1051.png +0 -0
  43. examples/depth_normal/rgb/1129.png +0 -0
  44. examples/depth_normal/rgb/1205.png +0 -0
  45. examples/depth_normal/rgb/1336.png +0 -0
  46. examples/depth_normal/rgb/1383.png +0 -0
  47. examples/depth_normal/rgb/1386.png +0 -0
  48. examples/depth_normal/rgb/1393.png +0 -0
  49. examples/depth_normal/rgb/1447.png +0 -0
app.py CHANGED
@@ -338,13 +338,14 @@ def gradio_worker(
338
  with gr.Tab('Normal Map') as normal_tab:
339
  normal_path = gr.Image(label='Normal Map', type='filepath')
340
  normal_rgb_path = gr.Image(label='RGB Image', type='filepath')
341
- # gr.Examples(
342
- # examples=[
343
- # [rgb_image.replace('rgb', 'normal'), rgb_image]
344
- # for rgb_image in glob.glob("examples/depth_normal/rgb/*.png")[-9:]
345
- # ],
346
- # inputs=[normal_path, normal_rgb_path]
347
- # )
 
348
  with gr.Column(scale=2):
349
  chatbot = gr.Chatbot(elem_id="chatbot")
350
  msg = gr.Textbox()
 
338
  with gr.Tab('Normal Map') as normal_tab:
339
  normal_path = gr.Image(label='Normal Map', type='filepath')
340
  normal_rgb_path = gr.Image(label='RGB Image', type='filepath')
341
+ gr.Examples(
342
+ examples=[
343
+ [rgb_image.replace('rgb', 'normal'), rgb_image]
344
+ for rgb_image in glob.glob("examples/depth_normal/rgb/*.png")[-9:]
345
+ ],
346
+ inputs=[normal_path, normal_rgb_path],
347
+ examples_per_page=3,
348
+ )
349
  with gr.Column(scale=2):
350
  chatbot = gr.Chatbot(elem_id="chatbot")
351
  msg = gr.Textbox()
examples/depth_normal/depth/0084.png ADDED
examples/depth_normal/depth/0131.png ADDED
examples/depth_normal/depth/0297.png ADDED
examples/depth_normal/depth/0633.png ADDED
examples/depth_normal/depth/0663.png ADDED
examples/depth_normal/depth/0771.png ADDED
examples/depth_normal/depth/0782.png ADDED
examples/depth_normal/depth/1001.png ADDED
examples/depth_normal/depth/1051.png ADDED
examples/depth_normal/depth/1129.png ADDED
examples/depth_normal/depth/1205.png ADDED
examples/depth_normal/depth/1336.png ADDED
examples/depth_normal/depth/1383.png ADDED
examples/depth_normal/depth/1386.png ADDED
examples/depth_normal/depth/1393.png ADDED
examples/depth_normal/depth/1447.png ADDED
examples/depth_normal/normal/0084.png ADDED
examples/depth_normal/normal/0131.png ADDED
examples/depth_normal/normal/0297.png ADDED
examples/depth_normal/normal/0633.png ADDED
examples/depth_normal/normal/0663.png ADDED
examples/depth_normal/normal/0771.png ADDED
examples/depth_normal/normal/0782.png ADDED
examples/depth_normal/normal/1001.png ADDED
examples/depth_normal/normal/1051.png ADDED
examples/depth_normal/normal/1129.png ADDED
examples/depth_normal/normal/1205.png ADDED
examples/depth_normal/normal/1336.png ADDED
examples/depth_normal/normal/1383.png ADDED
examples/depth_normal/normal/1386.png ADDED
examples/depth_normal/normal/1393.png ADDED
examples/depth_normal/normal/1447.png ADDED
examples/depth_normal/rgb/0084.png ADDED
examples/depth_normal/rgb/0131.png ADDED
examples/depth_normal/rgb/0297.png ADDED
examples/depth_normal/rgb/0633.png ADDED
examples/depth_normal/rgb/0663.png ADDED
examples/depth_normal/rgb/0771.png ADDED
examples/depth_normal/rgb/0782.png ADDED
examples/depth_normal/rgb/1001.png ADDED
examples/depth_normal/rgb/1051.png ADDED
examples/depth_normal/rgb/1129.png ADDED
examples/depth_normal/rgb/1205.png ADDED
examples/depth_normal/rgb/1336.png ADDED
examples/depth_normal/rgb/1383.png ADDED
examples/depth_normal/rgb/1386.png ADDED
examples/depth_normal/rgb/1393.png ADDED
examples/depth_normal/rgb/1447.png ADDED