Spaces:
Running on Zero
Running on Zero
Upgrade gradio SDK to 5.50.0
Browse files- Bump sdk_version 4.36.0 -> 5.50.0 to address gradio <5.0.0 security advisories
- Drop gradio_imageslider (broken on gradio 5+) and use the native gr.ImageSlider added in 5.27.0
- Unpin huggingface_hub (==0.21.0 conflicts with gradio 5.x's huggingface_hub>=0.33.5)
Co-authored-by: Cursor <cursoragent@cursor.com>
- README.md +1 -1
- app.py +1 -2
- requirements.txt +1 -3
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: 🌖
|
|
| 4 |
colorFrom: red
|
| 5 |
colorTo: indigo
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: apache-2.0
|
|
|
|
| 4 |
colorFrom: red
|
| 5 |
colorTo: indigo
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 5.50.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: apache-2.0
|
app.py
CHANGED
|
@@ -7,7 +7,6 @@ from PIL import Image
|
|
| 7 |
import spaces
|
| 8 |
import torch
|
| 9 |
import tempfile
|
| 10 |
-
from gradio_imageslider import ImageSlider
|
| 11 |
from huggingface_hub import hf_hub_download
|
| 12 |
|
| 13 |
from depth_anything_v2.dpt import DepthAnythingV2
|
|
@@ -62,7 +61,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 62 |
|
| 63 |
with gr.Row():
|
| 64 |
input_image = gr.Image(label="Input Image", type='numpy', elem_id='img-display-input')
|
| 65 |
-
depth_image_slider = ImageSlider(label="Depth Map with Slider View", elem_id='img-display-output',
|
| 66 |
submit = gr.Button(value="Compute Depth")
|
| 67 |
gray_depth_file = gr.File(label="Grayscale depth map", elem_id="download",)
|
| 68 |
raw_file = gr.File(label="16-bit raw output (can be considered as disparity)", elem_id="download",)
|
|
|
|
| 7 |
import spaces
|
| 8 |
import torch
|
| 9 |
import tempfile
|
|
|
|
| 10 |
from huggingface_hub import hf_hub_download
|
| 11 |
|
| 12 |
from depth_anything_v2.dpt import DepthAnythingV2
|
|
|
|
| 61 |
|
| 62 |
with gr.Row():
|
| 63 |
input_image = gr.Image(label="Input Image", type='numpy', elem_id='img-display-input')
|
| 64 |
+
depth_image_slider = gr.ImageSlider(label="Depth Map with Slider View", elem_id='img-display-output', slider_position=50)
|
| 65 |
submit = gr.Button(value="Compute Depth")
|
| 66 |
gray_depth_file = gr.File(label="Grayscale depth map", elem_id="download",)
|
| 67 |
raw_file = gr.File(label="16-bit raw output (can be considered as disparity)", elem_id="download",)
|
requirements.txt
CHANGED
|
@@ -1,7 +1,5 @@
|
|
| 1 |
-
gradio_imageslider
|
| 2 |
-
gradio
|
| 3 |
torch
|
| 4 |
torchvision
|
| 5 |
opencv-python
|
| 6 |
matplotlib
|
| 7 |
-
huggingface_hub
|
|
|
|
|
|
|
|
|
|
| 1 |
torch
|
| 2 |
torchvision
|
| 3 |
opencv-python
|
| 4 |
matplotlib
|
| 5 |
+
huggingface_hub
|