Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,6 @@ import trimesh
|
|
| 12 |
print("⏳ Loading Depth Anything V2 model...")
|
| 13 |
|
| 14 |
# CPUで動く軽量モデルを指定
|
| 15 |
-
# ※ transformersのパイプラインを使うと非常にコードが短くなります
|
| 16 |
depth_pipe = pipeline(
|
| 17 |
task="depth-estimation",
|
| 18 |
model="depth-anything/Depth-Anything-V2-Small-hf",
|
|
@@ -127,9 +126,11 @@ with gr.Blocks(css=custom_css, title="3D Depth Magic") as demo:
|
|
| 127 |
outputs=[output_depth, output_3d]
|
| 128 |
)
|
| 129 |
|
|
|
|
| 130 |
gr.Examples(
|
| 131 |
-
examples=["https://
|
| 132 |
-
inputs=input_img
|
|
|
|
| 133 |
)
|
| 134 |
|
| 135 |
if __name__ == "__main__":
|
|
|
|
| 12 |
print("⏳ Loading Depth Anything V2 model...")
|
| 13 |
|
| 14 |
# CPUで動く軽量モデルを指定
|
|
|
|
| 15 |
depth_pipe = pipeline(
|
| 16 |
task="depth-estimation",
|
| 17 |
model="depth-anything/Depth-Anything-V2-Small-hf",
|
|
|
|
| 126 |
outputs=[output_depth, output_3d]
|
| 127 |
)
|
| 128 |
|
| 129 |
+
# 【変更点】URLをHugging Face内部のもの(猫の画像)に変更しました
|
| 130 |
gr.Examples(
|
| 131 |
+
examples=["https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png"],
|
| 132 |
+
inputs=input_img,
|
| 133 |
+
label="サンプル画像"
|
| 134 |
)
|
| 135 |
|
| 136 |
if __name__ == "__main__":
|