Gpagejr12 commited on
Commit
f0c1424
·
verified ·
1 Parent(s): 6e817b5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -37,10 +37,10 @@ def save_audio(samples: torch.Tensor):
37
  sample_rate = 30000
38
  save_path = "/tmp/audio_output" # Use /tmp directory
39
 
40
- # if not os.path.exists(save_path):
41
- # os.makedirs(save_path)
42
 
43
- # assert samples.dim() == 2 or samples.dim() == 3
44
 
45
  samples = samples.detach().cpu()
46
  if samples.dim() == 2:
 
37
  sample_rate = 30000
38
  save_path = "/tmp/audio_output" # Use /tmp directory
39
 
40
+ if not os.path.exists(save_path):
41
+ os.makedirs(save_path)
42
 
43
+ assert samples.dim() == 2 or samples.dim() == 3
44
 
45
  samples = samples.detach().cpu()
46
  if samples.dim() == 2: