Fix Markdown rendering: dedent so Gradio 5 does not treat title as code
Browse files
app.py
CHANGED
|
@@ -5,6 +5,7 @@ os.environ["GRADIO_ANALYTICS_ENABLED"] = "False"
|
|
| 5 |
import argparse
|
| 6 |
import socket
|
| 7 |
import time
|
|
|
|
| 8 |
from datetime import datetime
|
| 9 |
from glob import glob
|
| 10 |
from urllib.parse import quote
|
|
@@ -732,21 +733,24 @@ def build_demo(model_path):
|
|
| 732 |
}
|
| 733 |
""",
|
| 734 |
) as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 735 |
gr.Markdown(
|
| 736 |
-
|
| 737 |
-
|
| 738 |
-
|
| 739 |
-
|
| 740 |
-
|
| 741 |
-
|
| 742 |
-
|
| 743 |
-
|
| 744 |
-
|
| 745 |
-
|
| 746 |
-
|
| 747 |
-
if IS_HF_SPACE
|
| 748 |
-
else ""
|
| 749 |
-
)
|
| 750 |
)
|
| 751 |
|
| 752 |
panel_height = 360
|
|
@@ -784,14 +788,16 @@ def build_demo(model_path):
|
|
| 784 |
)
|
| 785 |
run_btn = gr.Button("Run", variant="primary")
|
| 786 |
gr.Markdown(
|
| 787 |
-
|
| 788 |
-
|
| 789 |
-
|
| 790 |
-
|
| 791 |
-
|
| 792 |
-
|
| 793 |
-
|
| 794 |
-
|
|
|
|
|
|
|
| 795 |
)
|
| 796 |
with gr.Column(scale=2):
|
| 797 |
point_cloud_output = gr.HTML(
|
|
|
|
| 5 |
import argparse
|
| 6 |
import socket
|
| 7 |
import time
|
| 8 |
+
import textwrap
|
| 9 |
from datetime import datetime
|
| 10 |
from glob import glob
|
| 11 |
from urllib.parse import quote
|
|
|
|
| 733 |
}
|
| 734 |
""",
|
| 735 |
) as demo:
|
| 736 |
+
tip = (
|
| 737 |
+
"\n\n> **Tip:** On this Space, **Small** is the default for fast responses. "
|
| 738 |
+
"**Large** is much slower and may time out on ZeroGPU."
|
| 739 |
+
if IS_HF_SPACE
|
| 740 |
+
else ""
|
| 741 |
+
)
|
| 742 |
gr.Markdown(
|
| 743 |
+
textwrap.dedent(
|
| 744 |
+
"""
|
| 745 |
+
# Depth Anything in 360掳
|
| 746 |
+
Upload a panoramic image to estimate metric-consistent depth and visualize a 3D point cloud.
|
| 747 |
+
|
| 748 |
+
[Project Page](https://insta360-research-team.github.io/DA360/) |
|
| 749 |
+
[Paper](https://arxiv.org/abs/2512.22819) |
|
| 750 |
+
[GitHub](https://github.com/insta360-research-team/DA360)
|
| 751 |
+
"""
|
| 752 |
+
).strip()
|
| 753 |
+
+ tip
|
|
|
|
|
|
|
|
|
|
| 754 |
)
|
| 755 |
|
| 756 |
panel_height = 360
|
|
|
|
| 788 |
)
|
| 789 |
run_btn = gr.Button("Run", variant="primary")
|
| 790 |
gr.Markdown(
|
| 791 |
+
textwrap.dedent(
|
| 792 |
+
"""
|
| 793 |
+
**3D Point Cloud Controls** (in the viewer)
|
| 794 |
+
- **Left drag**: Rotate 路 **Right drag**: Pan 路 **Wheel**: Zoom
|
| 795 |
+
- **Point Size** slider: resize points live (no reload)
|
| 796 |
+
- **Size attenuation**: perspective vs. constant screen size
|
| 797 |
+
|
| 798 |
+
> Outdoor scenes filter distant noise; indoor scenes remove the ceiling.
|
| 799 |
+
"""
|
| 800 |
+
).strip()
|
| 801 |
)
|
| 802 |
with gr.Column(scale=2):
|
| 803 |
point_cloud_output = gr.HTML(
|