Spaces:
Runtime error
Runtime error
Commit ·
16a8f12
1
Parent(s): be9b1db
another update
Browse files- gradio_app.py +3 -3
- pyproject.toml +7 -5
gradio_app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
|
| 4 |
|
| 5 |
title = """# Segment Anything and Depth Anything"""
|
| 6 |
description1 = """
|
|
@@ -25,8 +25,8 @@ with gr.Blocks() as demo:
|
|
| 25 |
gr.Markdown(title)
|
| 26 |
gr.Markdown(description1)
|
| 27 |
gr.Markdown(description2)
|
| 28 |
-
|
| 29 |
-
|
| 30 |
|
| 31 |
if __name__ == "__main__":
|
| 32 |
demo.queue(max_size=2).launch(ssr_mode=False)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
from annotation_example.gradio_ui.sv_sam import single_view_block
|
| 4 |
|
| 5 |
title = """# Segment Anything and Depth Anything"""
|
| 6 |
description1 = """
|
|
|
|
| 25 |
gr.Markdown(title)
|
| 26 |
gr.Markdown(description1)
|
| 27 |
gr.Markdown(description2)
|
| 28 |
+
with gr.Tab("Monocular"):
|
| 29 |
+
single_view_block.render()
|
| 30 |
|
| 31 |
if __name__ == "__main__":
|
| 32 |
demo.queue(max_size=2).launch(ssr_mode=False)
|
pyproject.toml
CHANGED
|
@@ -6,8 +6,8 @@ authors = [{ name = "Pablo Vela", email = "pablovela5620@gmail.com" }]
|
|
| 6 |
requires-python = ">= 3.10"
|
| 7 |
dependencies = [
|
| 8 |
"mmcv-lite>=2.2.0,<2.3",
|
| 9 |
-
"build>=1.2.1,<2",
|
| 10 |
"hf-transfer>=0.1.8,<0.2",
|
|
|
|
| 11 |
]
|
| 12 |
|
| 13 |
[build-system]
|
|
@@ -23,7 +23,8 @@ platforms = ["linux-64"]
|
|
| 23 |
|
| 24 |
|
| 25 |
[tool.pixi.activation]
|
| 26 |
-
scripts = [".pixi.sh"]
|
|
|
|
| 27 |
|
| 28 |
[tool.pixi.pypi-options]
|
| 29 |
extra-index-urls = ["https://download.pytorch.org/whl/nightly/cu128"]
|
|
@@ -34,6 +35,7 @@ index-strategy = "unsafe-best-match"
|
|
| 34 |
[tool.pixi.tasks]
|
| 35 |
_install-wheel = "uv pip install ./$WHL_PATH --force-reinstall"
|
| 36 |
_build-wheel = "python -m build"
|
|
|
|
| 37 |
upload-hf = { cmd = "python tools/upload_to_hf.py", depends-on = [
|
| 38 |
"_build-wheel",
|
| 39 |
] }
|
|
@@ -89,7 +91,7 @@ cmd = """
|
|
| 89 |
python gradio_app.py
|
| 90 |
"""
|
| 91 |
description = "Runs Gradio frontend for depth comparison"
|
| 92 |
-
|
| 93 |
|
| 94 |
[tool.pixi.pypi-dependencies]
|
| 95 |
annotation_example = { path = ".", editable = true }
|
|
@@ -99,11 +101,11 @@ torchvision = { version = ">=0.20.1", index = "https://download.pytorch.org/whl/
|
|
| 99 |
torchcodec = { version = ">=0.2.1", index = "https://download.pytorch.org/whl/nightly/cu128" }
|
| 100 |
# cu128 version of xformers not yet available, needs to be built from source
|
| 101 |
# xformers = { version = ">=0.0.28.post3", index = "https://download.pytorch.org/whl/nightly/cu128" }
|
| 102 |
-
xformers = { git = "https://github.com/facebookresearch/xformers.git", rev = "main" }
|
| 103 |
vggt = { git = "https://github.com/facebookresearch/vggt.git", rev = "f8bf73ac25d5089cca2d6540a185697087fa2255" }
|
| 104 |
monopriors = { git = "https://github.com/pablovela5620/monoprior.git", rev = "90fe03ab3a4ee1b8df542d5b8638bf034d933757" }
|
| 105 |
# gradio-rerun = { url = "https://huggingface.co/datasets/pablovela5620/gradio-rr-0.23/resolve/main/gradio_rerun-0.0.8-py3-none-any.whl" }
|
| 106 |
-
gradio-rerun = { path = "
|
| 107 |
rerun-sdk = { url = "https://github.com/rerun-io/rerun/releases/download/prerelease/rerun_sdk-0.23.0a3+dev-cp38-abi3-manylinux_2_31_x86_64.whl" }
|
| 108 |
simplecv = { git = "https://github.com/pablovela5620/simplecv.git", rev = "e39f6d87126d8348e40fd2b46c30ced5d76cad76" }
|
| 109 |
|
|
|
|
| 6 |
requires-python = ">= 3.10"
|
| 7 |
dependencies = [
|
| 8 |
"mmcv-lite>=2.2.0,<2.3",
|
|
|
|
| 9 |
"hf-transfer>=0.1.8,<0.2",
|
| 10 |
+
"build>=1.2.2.post1,<2",
|
| 11 |
]
|
| 12 |
|
| 13 |
[build-system]
|
|
|
|
| 23 |
|
| 24 |
|
| 25 |
[tool.pixi.activation]
|
| 26 |
+
# scripts = [".pixi.sh"]
|
| 27 |
+
env = { WHL_PATH = "dist/annotation_example-0.1.0-py3-none-any.whl" }
|
| 28 |
|
| 29 |
[tool.pixi.pypi-options]
|
| 30 |
extra-index-urls = ["https://download.pytorch.org/whl/nightly/cu128"]
|
|
|
|
| 35 |
[tool.pixi.tasks]
|
| 36 |
_install-wheel = "uv pip install ./$WHL_PATH --force-reinstall"
|
| 37 |
_build-wheel = "python -m build"
|
| 38 |
+
post-install = "uv pip install 'git+https://github.com/facebookresearch/xformers.git@main#egg=xformers' --no-build-isolation"
|
| 39 |
upload-hf = { cmd = "python tools/upload_to_hf.py", depends-on = [
|
| 40 |
"_build-wheel",
|
| 41 |
] }
|
|
|
|
| 91 |
python gradio_app.py
|
| 92 |
"""
|
| 93 |
description = "Runs Gradio frontend for depth comparison"
|
| 94 |
+
depends-on = ["post-install"]
|
| 95 |
|
| 96 |
[tool.pixi.pypi-dependencies]
|
| 97 |
annotation_example = { path = ".", editable = true }
|
|
|
|
| 101 |
torchcodec = { version = ">=0.2.1", index = "https://download.pytorch.org/whl/nightly/cu128" }
|
| 102 |
# cu128 version of xformers not yet available, needs to be built from source
|
| 103 |
# xformers = { version = ">=0.0.28.post3", index = "https://download.pytorch.org/whl/nightly/cu128" }
|
| 104 |
+
# xformers = { git = "https://github.com/facebookresearch/xformers.git", rev = "main" }
|
| 105 |
vggt = { git = "https://github.com/facebookresearch/vggt.git", rev = "f8bf73ac25d5089cca2d6540a185697087fa2255" }
|
| 106 |
monopriors = { git = "https://github.com/pablovela5620/monoprior.git", rev = "90fe03ab3a4ee1b8df542d5b8638bf034d933757" }
|
| 107 |
# gradio-rerun = { url = "https://huggingface.co/datasets/pablovela5620/gradio-rr-0.23/resolve/main/gradio_rerun-0.0.8-py3-none-any.whl" }
|
| 108 |
+
gradio-rerun = { path = "dist/gradio_rerun-0.0.8-py3-none-any.whl" }
|
| 109 |
rerun-sdk = { url = "https://github.com/rerun-io/rerun/releases/download/prerelease/rerun_sdk-0.23.0a3+dev-cp38-abi3-manylinux_2_31_x86_64.whl" }
|
| 110 |
simplecv = { git = "https://github.com/pablovela5620/simplecv.git", rev = "e39f6d87126d8348e40fd2b46c30ced5d76cad76" }
|
| 111 |
|