Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -352,11 +352,6 @@ def process_line(img_path='./input', outdir='./output'):
|
|
| 352 |
|
| 353 |
|
| 354 |
if __name__ == '__main__':
|
| 355 |
-
# 原有的处理逻辑(如果需要)
|
| 356 |
-
# img_path = "input"
|
| 357 |
-
# outdir = "output"
|
| 358 |
-
# process_line(img_path, outdir)
|
| 359 |
-
|
| 360 |
# Gradio 接口代码
|
| 361 |
import gradio as gr
|
| 362 |
from PIL import Image
|
|
@@ -376,8 +371,8 @@ if __name__ == '__main__':
|
|
| 376 |
# 定义 Gradio 接口
|
| 377 |
iface = gr.Interface(
|
| 378 |
fn=gradio_process_line,
|
| 379 |
-
inputs=gr.
|
| 380 |
-
outputs="
|
| 381 |
title="Image Processing with Depth Anything and TEED",
|
| 382 |
description="Upload an image to process it with depth estimation and edge detection."
|
| 383 |
)
|
|
@@ -386,4 +381,5 @@ if __name__ == '__main__':
|
|
| 386 |
iface.launch()
|
| 387 |
|
| 388 |
|
|
|
|
| 389 |
|
|
|
|
| 352 |
|
| 353 |
|
| 354 |
if __name__ == '__main__':
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 355 |
# Gradio 接口代码
|
| 356 |
import gradio as gr
|
| 357 |
from PIL import Image
|
|
|
|
| 371 |
# 定义 Gradio 接口
|
| 372 |
iface = gr.Interface(
|
| 373 |
fn=gradio_process_line,
|
| 374 |
+
inputs=gr.Image(type="pil"),
|
| 375 |
+
outputs=gr.Image(type="pil"),
|
| 376 |
title="Image Processing with Depth Anything and TEED",
|
| 377 |
description="Upload an image to process it with depth estimation and edge detection."
|
| 378 |
)
|
|
|
|
| 381 |
iface.launch()
|
| 382 |
|
| 383 |
|
| 384 |
+
|
| 385 |
|