alexnasa commited on
Commit
151e5f8
Β·
verified Β·
1 Parent(s): 43ca9cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -106,6 +106,7 @@ def step1_trim(video_path, seconds, fps, state):
106
  return f"βœ… Step 1: Trimmed to {seconds}s @{fps}fps", state
107
 
108
  # Step 2: Preprocessing β†’ cropped video
 
109
  def step2_preprocess(state):
110
  session_id = state["session_id"]
111
  base_dir = state["base_dir"]
@@ -128,6 +129,7 @@ def step2_preprocess(state):
128
  return "βœ… Step 2: Preprocessing complete", video, state
129
 
130
  # Step 3: Normals inference β†’ normals video
 
131
  def step3_normals(state):
132
  session_id = state["session_id"]
133
  base_dir = state["base_dir"]
@@ -149,6 +151,7 @@ def step3_normals(state):
149
  return "βœ… Step 3: Normals inference complete", video, state
150
 
151
  # Step 4: UV map inference β†’ uv map video
 
152
  def step4_uv_map(state):
153
  session_id = state["session_id"]
154
  base_dir = state["base_dir"]
 
106
  return f"βœ… Step 1: Trimmed to {seconds}s @{fps}fps", state
107
 
108
  # Step 2: Preprocessing β†’ cropped video
109
+ @spaces.GPU()
110
  def step2_preprocess(state):
111
  session_id = state["session_id"]
112
  base_dir = state["base_dir"]
 
129
  return "βœ… Step 2: Preprocessing complete", video, state
130
 
131
  # Step 3: Normals inference β†’ normals video
132
+ @spaces.GPU()
133
  def step3_normals(state):
134
  session_id = state["session_id"]
135
  base_dir = state["base_dir"]
 
151
  return "βœ… Step 3: Normals inference complete", video, state
152
 
153
  # Step 4: UV map inference β†’ uv map video
154
+ @spaces.GPU()
155
  def step4_uv_map(state):
156
  session_id = state["session_id"]
157
  base_dir = state["base_dir"]