Hemanth0004 commited on
Commit
cdcdb9e
·
verified ·
1 Parent(s): 6d426fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -6,7 +6,7 @@ import subprocess
6
  import gradio as gr
7
 
8
  # Optional: set this if you want GPU on Spaces
9
- USE_GPU = True # Hugging Face: choose GPU hardware in Space settings
10
 
11
 
12
  def generate_motion(prompt: str):
@@ -20,15 +20,13 @@ def generate_motion(prompt: str):
20
  run_id = str(uuid.uuid4())[:8]
21
 
22
  # Build command
 
23
  cmd = [
24
  "python",
25
  "gen_t2m.py",
26
- "--gpu_id",
27
- "0" if USE_GPU else "-1",
28
- "--ext",
29
- run_id,
30
- "--text_prompt",
31
- prompt,
32
  ]
33
 
34
  # Run the generation
 
6
  import gradio as gr
7
 
8
  # Optional: set this if you want GPU on Spaces
9
+ USE_GPU = False # we're on CPU Basic now
10
 
11
 
12
  def generate_motion(prompt: str):
 
20
  run_id = str(uuid.uuid4())[:8]
21
 
22
  # Build command
23
+ gpu_flag = "-1" # CPU
24
  cmd = [
25
  "python",
26
  "gen_t2m.py",
27
+ "--gpu_id", gpu_flag,
28
+ "--ext", run_id,
29
+ "--text_prompt", prompt,
 
 
 
30
  ]
31
 
32
  # Run the generation