dkatz2391 commited on
Commit
26217ae
·
verified ·
1 Parent(s): df3aef9

file dir retry fix

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -104,6 +104,7 @@ def text_to_3d(
104
  str: The path to the video of the 3D model.
105
  """
106
  user_dir = os.path.join(TMP_DIR, str(req.session_hash))
 
107
  outputs = pipeline.run(
108
  prompt,
109
  seed=seed,
@@ -144,6 +145,7 @@ def extract_glb(
144
  str: The path to the extracted GLB file.
145
  """
146
  user_dir = os.path.join(TMP_DIR, str(req.session_hash))
 
147
  gs, mesh = unpack_state(state)
148
  glb = postprocessing_utils.to_glb(gs, mesh, simplify=mesh_simplify, texture_size=texture_size, verbose=False)
149
  glb_path = os.path.join(user_dir, 'sample.glb')
@@ -162,6 +164,7 @@ def extract_gaussian(state: dict, req: gr.Request) -> Tuple[str, str]:
162
  str: The path to the extracted Gaussian file.
163
  """
164
  user_dir = os.path.join(TMP_DIR, str(req.session_hash))
 
165
  gs, _ = unpack_state(state)
166
  gaussian_path = os.path.join(user_dir, 'sample.ply')
167
  gs.save_ply(gaussian_path)
 
104
  str: The path to the video of the 3D model.
105
  """
106
  user_dir = os.path.join(TMP_DIR, str(req.session_hash))
107
+ os.makedirs(user_dir, exist_ok=True)
108
  outputs = pipeline.run(
109
  prompt,
110
  seed=seed,
 
145
  str: The path to the extracted GLB file.
146
  """
147
  user_dir = os.path.join(TMP_DIR, str(req.session_hash))
148
+ os.makedirs(user_dir, exist_ok=True)
149
  gs, mesh = unpack_state(state)
150
  glb = postprocessing_utils.to_glb(gs, mesh, simplify=mesh_simplify, texture_size=texture_size, verbose=False)
151
  glb_path = os.path.join(user_dir, 'sample.glb')
 
164
  str: The path to the extracted Gaussian file.
165
  """
166
  user_dir = os.path.join(TMP_DIR, str(req.session_hash))
167
+ os.makedirs(user_dir, exist_ok=True)
168
  gs, _ = unpack_state(state)
169
  gaussian_path = os.path.join(user_dir, 'sample.ply')
170
  gs.save_ply(gaussian_path)