1qwsd commited on
Commit
377f129
·
verified ·
1 Parent(s): 519dd8f

ci: auto-deploy from GitHub Actions

Browse files
Files changed (2) hide show
  1. api/routes_pipeline.py +10 -4
  2. pipeline/export_utils.py +5 -3
api/routes_pipeline.py CHANGED
@@ -151,14 +151,20 @@ async def run_pipeline(job_id: str, data_dir: str, iterations: int):
151
 
152
  # Download the demo splat to be served
153
  import urllib.request
154
- demo_splat_url = "https://907-bot.github.io/Neo-twin/scenes/demo.splat"
155
- backup_url = "https://huggingface.co/datasets/jxuhf/nerf-gs-datasets/resolve/main/demo.splat"
156
  try:
 
157
  urllib.request.urlretrieve(demo_splat_url, splat_path)
158
- except Exception:
 
 
159
  try:
 
160
  urllib.request.urlretrieve(backup_url, splat_path)
161
- except Exception:
 
 
162
  # Create a placeholder dummy splat if offline completely
163
  with open(splat_path, "w") as f:
164
  f.write("dummy_splat_content")
 
151
 
152
  # Download the demo splat to be served
153
  import urllib.request
154
+ demo_splat_url = "https://huggingface.co/cakewalk/splat-data/resolve/main/plush.splat"
155
+ backup_url = "https://huggingface.co/cakewalk/splat-data/resolve/main/room.splat"
156
  try:
157
+ print(f"Downloading primary demo splat fallback from: {demo_splat_url}")
158
  urllib.request.urlretrieve(demo_splat_url, splat_path)
159
+ print("Successfully downloaded primary demo splat fallback!")
160
+ except Exception as e1:
161
+ print(f"Primary fallback URL failed: {str(e1)}. Trying backup URL...")
162
  try:
163
+ print(f"Downloading backup demo splat fallback from: {backup_url}")
164
  urllib.request.urlretrieve(backup_url, splat_path)
165
+ print("Successfully downloaded backup demo splat fallback!")
166
+ except Exception as e2:
167
+ print(f"Backup fallback URL also failed: {str(e2)}. Creating dummy placeholder...")
168
  # Create a placeholder dummy splat if offline completely
169
  with open(splat_path, "w") as f:
170
  f.write("dummy_splat_content")
pipeline/export_utils.py CHANGED
@@ -10,15 +10,17 @@ def export_splat(ply_path: str) -> str:
10
  except (ImportError, Exception) as e:
11
  print(f"[NeoTwin Fallback] gsplat compression skipped or unavailable: {str(e)}")
12
  print("Downloading a pre-baked beautiful demo .splat file to complete the pipeline...")
13
- demo_splat_url = "https://907-bot.github.io/Neo-twin/scenes/demo.splat"
14
- backup_url = "https://huggingface.co/datasets/jxuhf/nerf-gs-datasets/resolve/main/demo.splat"
15
  try:
16
  os.makedirs(os.path.dirname(output_path), exist_ok=True)
 
17
  urllib.request.urlretrieve(demo_splat_url, output_path)
18
- print("Successfully downloaded demo splat!")
19
  except Exception as e1:
20
  print(f"Primary URL failed: {str(e1)}. Trying backup URL...")
21
  try:
 
22
  urllib.request.urlretrieve(backup_url, output_path)
23
  print("Successfully downloaded backup demo splat!")
24
  except Exception as e2:
 
10
  except (ImportError, Exception) as e:
11
  print(f"[NeoTwin Fallback] gsplat compression skipped or unavailable: {str(e)}")
12
  print("Downloading a pre-baked beautiful demo .splat file to complete the pipeline...")
13
+ demo_splat_url = "https://huggingface.co/cakewalk/splat-data/resolve/main/plush.splat"
14
+ backup_url = "https://huggingface.co/cakewalk/splat-data/resolve/main/room.splat"
15
  try:
16
  os.makedirs(os.path.dirname(output_path), exist_ok=True)
17
+ print(f"Downloading primary demo splat from: {demo_splat_url}")
18
  urllib.request.urlretrieve(demo_splat_url, output_path)
19
+ print("Successfully downloaded primary demo splat!")
20
  except Exception as e1:
21
  print(f"Primary URL failed: {str(e1)}. Trying backup URL...")
22
  try:
23
+ print(f"Downloading backup demo splat from: {backup_url}")
24
  urllib.request.urlretrieve(backup_url, output_path)
25
  print("Successfully downloaded backup demo splat!")
26
  except Exception as e2: