Spaces:
Runtime error
Runtime error
jiaqianjing
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -57,7 +57,7 @@ title = "# Depth Anything V2"
|
|
57 |
description = """Official demo for **Depth Anything V2**.
|
58 |
Please refer to our [paper](https://arxiv.org/abs/2406.09414), [project page](https://depth-anything-v2.github.io), and [github](https://github.com/DepthAnything/Depth-Anything-V2) for more details."""
|
59 |
|
60 |
-
@spaces.GPU
|
61 |
def predict_depth(image):
|
62 |
return model.infer_image(image)
|
63 |
|
@@ -120,8 +120,8 @@ with gr.Blocks(css=css) as demo:
|
|
120 |
|
121 |
example_files = os.listdir('assets/examples')
|
122 |
example_files.sort()
|
123 |
-
example_files = [os.path.join('assets/examples', filename) for filename in example_files]
|
124 |
-
examples = gr.Examples(examples=example_files, inputs=[input_image], outputs=[depth_image_slider, gray_depth_file, raw_file], fn=on_submit)
|
125 |
|
126 |
|
127 |
if __name__ == '__main__':
|
|
|
57 |
description = """Official demo for **Depth Anything V2**.
|
58 |
Please refer to our [paper](https://arxiv.org/abs/2406.09414), [project page](https://depth-anything-v2.github.io), and [github](https://github.com/DepthAnything/Depth-Anything-V2) for more details."""
|
59 |
|
60 |
+
# @spaces.GPU
|
61 |
def predict_depth(image):
|
62 |
return model.infer_image(image)
|
63 |
|
|
|
120 |
|
121 |
example_files = os.listdir('assets/examples')
|
122 |
example_files.sort()
|
123 |
+
example_files = [[os.path.join('assets/examples', filename), "vits"] for filename in example_files]
|
124 |
+
examples = gr.Examples(examples=example_files, inputs=[input_image, encoder_dropdown], outputs=[depth_image_slider, gray_depth_file, raw_file], fn=on_submit)
|
125 |
|
126 |
|
127 |
if __name__ == '__main__':
|