plutosss commited on
Commit
8aabfe9
·
verified ·
1 Parent(s): 32dfe62

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -343,6 +343,7 @@ def process_images(input_folder='./output/merged_imgs'):
343
  print(f"Error processing file {image_file}: {e}")
344
 
345
  def process_line(img, outdir='./output'):
 
346
  img_path = "./input"
347
 
348
  # 确保 img 是一个有效的 NumPy 数组
@@ -386,11 +387,12 @@ if __name__ == '__main__':
386
 
387
  if __name__ == '__main__':
388
  # 创建 Gradio 接口
389
- interface = gr.Interface(fn=process_line,
390
- inputs=gr.Image(type="numpy", label="Upload Image"),
391
- outputs=gr.Image(label="Output Image"),
392
- title="Image Processing",
393
- description="Upload an image to process it using depth-anything and TEED.")
 
394
 
395
  # 启动 Gradio 接口
396
  interface.launch()
 
343
  print(f"Error processing file {image_file}: {e}")
344
 
345
  def process_line(img, outdir='./output'):
346
+ print(f"Received img type: {type(img)}")
347
  img_path = "./input"
348
 
349
  # 确保 img 是一个有效的 NumPy 数组
 
387
 
388
  if __name__ == '__main__':
389
  # 创建 Gradio 接口
390
+ interface = gr.Interface(fn=process_line,
391
+ inputs=gr.Image(type="numpy", label="Upload Image"),
392
+ outputs=gr.Image(label="Output Image"),
393
+ title="Image Processing",
394
+ description="Upload an image to process it using depth-anything and TEED.")
395
+
396
 
397
  # 启动 Gradio 接口
398
  interface.launch()