freddyaboulton HF staff commited on
Commit
64fec4b
1 Parent(s): 2b92c5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -70,7 +70,7 @@ def transcribe(audio: tuple[int, np.ndarray], transformers_convo: list[dict], gr
70
  inputs["input_ids"] = inputs["input_ids"].to("cuda:0")
71
 
72
  generate_ids = model.generate(**inputs, max_length=256)
73
- generate_ids = generate_ids[:, inputs.input_ids.size(1):]
74
  response = processor.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
75
  print("response", response)
76
  transformers_convo.append({"role": "assistant", "content": response})
 
70
  inputs["input_ids"] = inputs["input_ids"].to("cuda:0")
71
 
72
  generate_ids = model.generate(**inputs, max_length=256)
73
+ generate_ids = generate_ids[:, inputs["input_ids"].size(1):]
74
  response = processor.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
75
  print("response", response)
76
  transformers_convo.append({"role": "assistant", "content": response})