osanseviero commited on
Commit
ca407fa
·
1 Parent(s): 6e0dd6c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -28,7 +28,7 @@ def predict(text):
28
  with torch.autocast("cuda"):
29
  outputs = model.generate(**inputs, do_sample=True, guidance_scale=3, max_new_tokens=512)
30
 
31
- with tempfile.NamedTemporaryFile() as tmp:
32
  video_path = gr.make_waveform((32000, outputs[0].cpu().numpy().astype(np.float16).ravel()), bars_color=random.choice(COLORS), bar_count=75)
33
  command = f'ffmpeg -y -i {video_path} -vf "scale=250:150" {tmp.name}'
34
  subprocess.run(command.split())
 
28
  with torch.autocast("cuda"):
29
  outputs = model.generate(**inputs, do_sample=True, guidance_scale=3, max_new_tokens=512)
30
 
31
+ with tempfile.NamedTemporaryFile(suffix='.mp4') as tmp:
32
  video_path = gr.make_waveform((32000, outputs[0].cpu().numpy().astype(np.float16).ravel()), bars_color=random.choice(COLORS), bar_count=75)
33
  command = f'ffmpeg -y -i {video_path} -vf "scale=250:150" {tmp.name}'
34
  subprocess.run(command.split())