Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,12 +24,12 @@ os.makedirs(CUSTOM_SAVE_DIR, exist_ok=True)
|
|
| 24 |
|
| 25 |
|
| 26 |
def start_session(req: gr.Request):
|
| 27 |
-
user_dir = os.path.join(
|
| 28 |
os.makedirs(user_dir, exist_ok=True)
|
| 29 |
|
| 30 |
|
| 31 |
def end_session(req: gr.Request):
|
| 32 |
-
user_dir = os.path.join(
|
| 33 |
shutil.rmtree(user_dir)
|
| 34 |
|
| 35 |
|
|
@@ -224,7 +224,7 @@ def extract_gaussian(state: dict, req: gr.Request) -> Tuple[str, str]:
|
|
| 224 |
Returns:
|
| 225 |
Tuple[str, str]: Paths to the extracted Gaussian file (for display and download)
|
| 226 |
"""
|
| 227 |
-
user_dir = os.path.join(
|
| 228 |
gs, _ = unpack_state(state)
|
| 229 |
gaussian_path = os.path.join(user_dir, 'sample.ply')
|
| 230 |
gs.save_ply(gaussian_path)
|
|
|
|
| 24 |
|
| 25 |
|
| 26 |
def start_session(req: gr.Request):
|
| 27 |
+
user_dir = os.path.join(CUSTOM_SAVE_DIR, str(req.session_hash))
|
| 28 |
os.makedirs(user_dir, exist_ok=True)
|
| 29 |
|
| 30 |
|
| 31 |
def end_session(req: gr.Request):
|
| 32 |
+
user_dir = os.path.join(CUSTOM_SAVE_DIR, str(req.session_hash))
|
| 33 |
shutil.rmtree(user_dir)
|
| 34 |
|
| 35 |
|
|
|
|
| 224 |
Returns:
|
| 225 |
Tuple[str, str]: Paths to the extracted Gaussian file (for display and download)
|
| 226 |
"""
|
| 227 |
+
user_dir = os.path.join(CUSTOM_SAVE_DIR, str(req.session_hash))
|
| 228 |
gs, _ = unpack_state(state)
|
| 229 |
gaussian_path = os.path.join(user_dir, 'sample.ply')
|
| 230 |
gs.save_ply(gaussian_path)
|