Spaces:
Running
on
Zero
Running
on
Zero
xinjie.wang
commited on
Commit
·
5801428
1
Parent(s):
ccb2f50
update
Browse files
app.py
CHANGED
@@ -24,17 +24,6 @@ os.makedirs(TMP_DIR, exist_ok=True)
|
|
24 |
# CHECKERS = [GEO_CHECKER, SEG_CHECKER, AESTHETIC_CHECKER]
|
25 |
# URDF_CONVERTOR = URDFGenerator(GPT_CLIENT, render_view_num=4)
|
26 |
|
27 |
-
|
28 |
-
def start_session(req: gr.Request) -> None:
|
29 |
-
user_dir = os.path.join(TMP_DIR, str(req.session_hash))
|
30 |
-
os.makedirs(user_dir, exist_ok=True)
|
31 |
-
|
32 |
-
|
33 |
-
def end_session(req: gr.Request) -> None:
|
34 |
-
user_dir = os.path.join(TMP_DIR, str(req.session_hash))
|
35 |
-
if os.path.exists(user_dir):
|
36 |
-
shutil.rmtree(user_dir)
|
37 |
-
|
38 |
@spaces.GPU
|
39 |
def greet(n):
|
40 |
print(zero.device) # <-- 'cuda:0' 🤗
|
@@ -44,17 +33,17 @@ with gr.Blocks(
|
|
44 |
delete_cache=(43200, 43200)
|
45 |
) as demo:
|
46 |
with gr.Column():
|
47 |
-
video_output = gr.Video(
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
)
|
54 |
-
model_output_gs = gr.Model3D(
|
55 |
-
|
56 |
-
)
|
57 |
-
aligned_gs = gr.Textbox(visible=False)
|
58 |
|
59 |
# model_output_mesh = LitModel3D(
|
60 |
# # label="Mesh Representation",
|
@@ -67,10 +56,6 @@ with gr.Blocks(
|
|
67 |
""" The rendering of `Gaussian Representation` takes additional 10s. """ # noqa
|
68 |
)
|
69 |
|
70 |
-
demo.load(start_session)
|
71 |
-
demo.unload(end_session)
|
72 |
-
|
73 |
-
|
74 |
|
75 |
if __name__ == "__main__":
|
76 |
demo.launch()
|
|
|
24 |
# CHECKERS = [GEO_CHECKER, SEG_CHECKER, AESTHETIC_CHECKER]
|
25 |
# URDF_CONVERTOR = URDFGenerator(GPT_CLIENT, render_view_num=4)
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
@spaces.GPU
|
28 |
def greet(n):
|
29 |
print(zero.device) # <-- 'cuda:0' 🤗
|
|
|
33 |
delete_cache=(43200, 43200)
|
34 |
) as demo:
|
35 |
with gr.Column():
|
36 |
+
# video_output = gr.Video(
|
37 |
+
# label="Generated 3D Asset",
|
38 |
+
# autoplay=True,
|
39 |
+
# loop=True,
|
40 |
+
# height=300,
|
41 |
+
# interactive=False
|
42 |
+
# )
|
43 |
+
# model_output_gs = gr.Model3D(
|
44 |
+
# label="Gaussian Representation", height=300, interactive=False
|
45 |
+
# )
|
46 |
+
# aligned_gs = gr.Textbox(visible=False)
|
47 |
|
48 |
# model_output_mesh = LitModel3D(
|
49 |
# # label="Mesh Representation",
|
|
|
56 |
""" The rendering of `Gaussian Representation` takes additional 10s. """ # noqa
|
57 |
)
|
58 |
|
|
|
|
|
|
|
|
|
59 |
|
60 |
if __name__ == "__main__":
|
61 |
demo.launch()
|