Samuel L Meyers commited on
Commit ·
4e73de3
1
Parent(s): 68f53ee
Yay! It's broken againgit add
Browse files10 unmodified lines1112131415161710 unmodified linesdef greet(text):inputs = tokenizer(text, return_tensors="pt")with torch.no_grad():output = model(input_ids=inputs, num_beams=4, speech_do_sample=True, **inputs).waveformout = output[0]wavfile.write("tmp.wav", rate=16000, data=out)return open("tmp.wav", "rb").read()10 unmodified lines1112131415161710 unmodified linesdef greet(text):inputs = tokenizer(text, return_tensors="pt")with torch.no_grad():output = model(**inputs).waveformout = output[0]wavfile.write("tmp.wav", rate=16000, data=out)return open("tmp.wav", "rb").read()
app.py+1-1