guangkaixu commited on
Commit
d9bd77d
1 Parent(s): 91c383d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -8
app.py CHANGED
@@ -288,9 +288,9 @@ def run_demo_server(pipe_depth, pipe_normal, pipe_dis):
288
  ],
289
  inputs=[depth_image_input],
290
  outputs=[depth_image_output_slider, depth_image_output_files],
291
- # cache_examples=True,
292
  # directory_name="examples_depth",
293
- cache_examples=False,
294
  )
295
 
296
  with gr.Tab("Normal"):
@@ -333,7 +333,10 @@ def run_demo_server(pipe_depth, pipe_normal, pipe_dis):
333
 
334
  filenames = ['normal_1.jpg','normal_10.jpg']
335
  # filenames.extend(["normal_%d.jpg" %(i+1) for i in range(10)])
336
- example_folder = "images"
 
 
 
337
  Examples(
338
  fn=process_pipe_normal,
339
  examples=[
@@ -342,9 +345,9 @@ def run_demo_server(pipe_depth, pipe_normal, pipe_dis):
342
  ],
343
  inputs=[normal_image_input],
344
  outputs=[normal_image_output, normal_image_output_files],
345
- # cache_examples=True,
346
  # directory_name="examples_normal",
347
- cache_examples=False,
348
  )
349
 
350
 
@@ -388,7 +391,9 @@ def run_demo_server(pipe_depth, pipe_normal, pipe_dis):
388
 
389
  filenames = []
390
  filenames.extend(["dis_%d.jpg" %(i+1) for i in range(10)])
391
- example_folder = "./images"
 
 
392
  Examples(
393
  fn=process_pipe_dis,
394
  examples=[
@@ -397,9 +402,9 @@ def run_demo_server(pipe_depth, pipe_normal, pipe_dis):
397
  ],
398
  inputs=[dis_image_input],
399
  outputs=[dis_image_output, dis_image_output_files],
400
- # cache_examples=True,
401
  # directory_name="examples_dis",
402
- cache_examples=False,
403
  )
404
 
405
 
 
288
  ],
289
  inputs=[depth_image_input],
290
  outputs=[depth_image_output_slider, depth_image_output_files],
291
+ cache_examples=True,
292
  # directory_name="examples_depth",
293
+ # cache_examples=False,
294
  )
295
 
296
  with gr.Tab("Normal"):
 
333
 
334
  filenames = ['normal_1.jpg','normal_10.jpg']
335
  # filenames.extend(["normal_%d.jpg" %(i+1) for i in range(10)])
336
+ # example_folder = "images"
337
+ example_folder = os.path.join(os.path.dirname(__file__), "./images")
338
+ print(example_folder)
339
+
340
  Examples(
341
  fn=process_pipe_normal,
342
  examples=[
 
345
  ],
346
  inputs=[normal_image_input],
347
  outputs=[normal_image_output, normal_image_output_files],
348
+ cache_examples=True,
349
  # directory_name="examples_normal",
350
+ # cache_examples=False,
351
  )
352
 
353
 
 
391
 
392
  filenames = []
393
  filenames.extend(["dis_%d.jpg" %(i+1) for i in range(10)])
394
+ # example_folder = "images"
395
+ example_folder = os.path.join(os.path.dirname(__file__), "./images")
396
+ print(example_folder)
397
  Examples(
398
  fn=process_pipe_dis,
399
  examples=[
 
402
  ],
403
  inputs=[dis_image_input],
404
  outputs=[dis_image_output, dis_image_output_files],
405
+ cache_examples=True,
406
  # directory_name="examples_dis",
407
+ # cache_examples=False,
408
  )
409
 
410