TK156
fix: Space安定化のため最小限Interface構成
d2d0263
raw
history blame
574 Bytes
import gradio as gr
def create_depth_map(image):
"""画像処理: 元画像をそのまま返して接続テスト"""
if image is None:
return None, None
return image, image
# シンプルなGradio Interface
demo = gr.Interface(
fn=create_depth_map,
inputs=gr.Image(type="pil", label="入力画像"),
outputs=[
gr.Image(label="元画像"),
gr.Image(label="深度マップ")
],
title="🌊 深度推定 API",
description="画像をアップロードしてテスト"
)
if __name__ == "__main__":
demo.launch()