burraco135 commited on
Commit
3f5bf4e
1 Parent(s): a8807eb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -16,9 +16,9 @@ def predict(text, speaker):
16
 
17
  inputs = processor(text=text, return_tensors="pt")
18
 
19
- # # limit input length
20
- # input_ids = inputs["input_ids"]
21
- # input_ids = input_ids[..., :model.config.max_text_positions]
22
 
23
  speaker_embedding = torch.tensor(speaker_embedding).unsqueeze(0)
24
 
 
16
 
17
  inputs = processor(text=text, return_tensors="pt")
18
 
19
+ # limit input length
20
+ input_ids = inputs["input_ids"]
21
+ input_ids = input_ids[..., :model.config.max_text_positions]
22
 
23
  speaker_embedding = torch.tensor(speaker_embedding).unsqueeze(0)
24