Spaces:
Running
on
Zero
Running
on
Zero
xiaoyuxi
commited on
Commit
·
8ce1c27
1
Parent(s):
2f28b42
vggt_da
Browse files
app.py
CHANGED
|
@@ -560,14 +560,16 @@ def launch_viz(grid_size, vo_points, fps, original_image_state):
|
|
| 560 |
with open(random_path, 'w', encoding='utf-8') as f:
|
| 561 |
f.write(viz_html)
|
| 562 |
|
| 563 |
-
# Create iframe HTML to display the saved file
|
| 564 |
# Create iframe HTML
|
| 565 |
iframe_html = f"""
|
| 566 |
-
<div style='border: 3px solid #667eea; border-radius: 10px;
|
| 567 |
-
|
|
|
|
|
|
|
| 568 |
<iframe id="viz_iframe" src="/gradio_api/file={random_path}"
|
| 569 |
width="100%" height="650" frameborder="0"
|
| 570 |
-
style="border:none; display:block; width:100%; height:650px;
|
|
|
|
| 571 |
</iframe>
|
| 572 |
</div>
|
| 573 |
"""
|
|
@@ -806,12 +808,18 @@ with gr.Blocks(
|
|
| 806 |
min-height: 650px !important;
|
| 807 |
max-height: 650px !important;
|
| 808 |
width: 100% !important;
|
|
|
|
|
|
|
|
|
|
| 809 |
}
|
| 810 |
#viz_container > div {
|
| 811 |
height: 650px !important;
|
| 812 |
min-height: 650px !important;
|
| 813 |
max-height: 650px !important;
|
| 814 |
width: 100% !important;
|
|
|
|
|
|
|
|
|
|
| 815 |
}
|
| 816 |
#viz_container iframe {
|
| 817 |
height: 650px !important;
|
|
@@ -820,6 +828,9 @@ with gr.Blocks(
|
|
| 820 |
width: 100% !important;
|
| 821 |
border: none !important;
|
| 822 |
display: block !important;
|
|
|
|
|
|
|
|
|
|
| 823 |
}
|
| 824 |
/* 固定视频上传组件高度 */
|
| 825 |
.gr-video {
|
|
@@ -1060,11 +1071,12 @@ with gr.Blocks(
|
|
| 1060 |
viz_html = gr.HTML(
|
| 1061 |
label="3D Trajectory Visualization",
|
| 1062 |
value="""
|
| 1063 |
-
<div style='border: 3px solid #667eea; border-radius: 10px;
|
| 1064 |
background: linear-gradient(135deg, #f8f9ff 0%, #e6f3ff 100%);
|
| 1065 |
text-align: center; height: 650px; display: flex;
|
| 1066 |
flex-direction: column; justify-content: center; align-items: center;
|
| 1067 |
-
box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
|
|
|
|
| 1068 |
<div style='font-size: 56px; margin-bottom: 25px;'>🌐</div>
|
| 1069 |
<h3 style='color: #667eea; margin-bottom: 18px; font-size: 28px; font-weight: 600;'>
|
| 1070 |
3D Trajectory Visualization
|
|
|
|
| 560 |
with open(random_path, 'w', encoding='utf-8') as f:
|
| 561 |
f.write(viz_html)
|
| 562 |
|
|
|
|
| 563 |
# Create iframe HTML
|
| 564 |
iframe_html = f"""
|
| 565 |
+
<div style='border: 3px solid #667eea; border-radius: 10px;
|
| 566 |
+
background: #f8f9ff; height: 650px; width: 100%;
|
| 567 |
+
box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
|
| 568 |
+
margin: 0; padding: 0; box-sizing: border-box; overflow: hidden;'>
|
| 569 |
<iframe id="viz_iframe" src="/gradio_api/file={random_path}"
|
| 570 |
width="100%" height="650" frameborder="0"
|
| 571 |
+
style="border: none; display: block; width: 100%; height: 650px;
|
| 572 |
+
margin: 0; padding: 0; border-radius: 7px;">
|
| 573 |
</iframe>
|
| 574 |
</div>
|
| 575 |
"""
|
|
|
|
| 808 |
min-height: 650px !important;
|
| 809 |
max-height: 650px !important;
|
| 810 |
width: 100% !important;
|
| 811 |
+
margin: 0 !important;
|
| 812 |
+
padding: 0 !important;
|
| 813 |
+
overflow: hidden !important;
|
| 814 |
}
|
| 815 |
#viz_container > div {
|
| 816 |
height: 650px !important;
|
| 817 |
min-height: 650px !important;
|
| 818 |
max-height: 650px !important;
|
| 819 |
width: 100% !important;
|
| 820 |
+
margin: 0 !important;
|
| 821 |
+
padding: 0 !important;
|
| 822 |
+
box-sizing: border-box !important;
|
| 823 |
}
|
| 824 |
#viz_container iframe {
|
| 825 |
height: 650px !important;
|
|
|
|
| 828 |
width: 100% !important;
|
| 829 |
border: none !important;
|
| 830 |
display: block !important;
|
| 831 |
+
margin: 0 !important;
|
| 832 |
+
padding: 0 !important;
|
| 833 |
+
box-sizing: border-box !important;
|
| 834 |
}
|
| 835 |
/* 固定视频上传组件高度 */
|
| 836 |
.gr-video {
|
|
|
|
| 1071 |
viz_html = gr.HTML(
|
| 1072 |
label="3D Trajectory Visualization",
|
| 1073 |
value="""
|
| 1074 |
+
<div style='border: 3px solid #667eea; border-radius: 10px;
|
| 1075 |
background: linear-gradient(135deg, #f8f9ff 0%, #e6f3ff 100%);
|
| 1076 |
text-align: center; height: 650px; display: flex;
|
| 1077 |
flex-direction: column; justify-content: center; align-items: center;
|
| 1078 |
+
box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
|
| 1079 |
+
margin: 0; padding: 20px; box-sizing: border-box;'>
|
| 1080 |
<div style='font-size: 56px; margin-bottom: 25px;'>🌐</div>
|
| 1081 |
<h3 style='color: #667eea; margin-bottom: 18px; font-size: 28px; font-weight: 600;'>
|
| 1082 |
3D Trajectory Visualization
|