AlexWortega commited on
Commit
54ccb2a
1 Parent(s): e1d1a57

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -1
main.py CHANGED
@@ -99,7 +99,8 @@ def decode_audio(tokens, quantizer, pad_tokens, n_original_tokens):
99
 
100
  # Inference functions
101
  def infer_text_to_audio(text, model, tokenizer, quantizer, max_seq_length=1024, top_k=20):
102
- text_tokenized = tokenizer(text, return_tensors="pt")
 
103
  text_input_tokens = text_tokenized["input_ids"].to(device)
104
 
105
  soa = tokenizer(start_audio_token, return_tensors="pt")["input_ids"][:, -1:].to(device)
 
99
 
100
  # Inference functions
101
  def infer_text_to_audio(text, model, tokenizer, quantizer, max_seq_length=1024, top_k=20):
102
+ print(text)
103
+ text_tokenized = tokenizer(str(text), return_tensors="pt")
104
  text_input_tokens = text_tokenized["input_ids"].to(device)
105
 
106
  soa = tokenizer(start_audio_token, return_tensors="pt")["input_ids"][:, -1:].to(device)