Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
eec28ea
1
Parent(s):
ce06be0
Fix creation of session dir.
Browse files
app.py
CHANGED
|
@@ -164,6 +164,7 @@ def generate_and_extract_glb(
|
|
| 164 |
str: The path to the extracted GLB file (for download).
|
| 165 |
"""
|
| 166 |
user_dir = os.path.join(TMP_DIR, str(req.session_hash))
|
|
|
|
| 167 |
|
| 168 |
# Generate 3D model
|
| 169 |
if not is_multiimage:
|
|
@@ -240,6 +241,7 @@ def extract_gaussian(state: dict, req: gr.Request) -> Tuple[str, str]:
|
|
| 240 |
Tuple[str, str]: Paths to the extracted Gaussian file (for display and download)
|
| 241 |
"""
|
| 242 |
user_dir = os.path.join(TMP_DIR, str(req.session_hash))
|
|
|
|
| 243 |
gs, _ = unpack_state(state)
|
| 244 |
gaussian_path = os.path.join(user_dir, "sample.ply")
|
| 245 |
gs.save_ply(gaussian_path)
|
|
|
|
| 164 |
str: The path to the extracted GLB file (for download).
|
| 165 |
"""
|
| 166 |
user_dir = os.path.join(TMP_DIR, str(req.session_hash))
|
| 167 |
+
os.makedirs(user_dir, exist_ok=True) # Ensure directory exists
|
| 168 |
|
| 169 |
# Generate 3D model
|
| 170 |
if not is_multiimage:
|
|
|
|
| 241 |
Tuple[str, str]: Paths to the extracted Gaussian file (for display and download)
|
| 242 |
"""
|
| 243 |
user_dir = os.path.join(TMP_DIR, str(req.session_hash))
|
| 244 |
+
os.makedirs(user_dir, exist_ok=True) # Ensure directory exists
|
| 245 |
gs, _ = unpack_state(state)
|
| 246 |
gaussian_path = os.path.join(user_dir, "sample.ply")
|
| 247 |
gs.save_ply(gaussian_path)
|