AjayP13 commited on
Commit
7f2c0d1
·
verified ·
1 Parent(s): 06fa875

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -28,8 +28,7 @@ def get_target_style_embeddings(target_texts_batch):
28
  return mean_embeddings.float().cpu().numpy()
29
 
30
  def get_luar_embeddings(texts_batch):
31
- print("HERE", texts_batch)
32
- assert set([len(texts) for texts in texts_batch]) == 1
33
  episodes = texts_batch
34
  tokenized_episodes = [luar_tokenizer(episode, max_length=512, padding="longest", truncation=True, return_tensors="pt").to(device) for episode in episodes]
35
  episode_lengths = [t["attention_mask"].shape[0] for t in tokenized_episodes]
 
28
  return mean_embeddings.float().cpu().numpy()
29
 
30
  def get_luar_embeddings(texts_batch):
31
+ assert len(set([len(texts) for texts in texts_batch])) == 1
 
32
  episodes = texts_batch
33
  tokenized_episodes = [luar_tokenizer(episode, max_length=512, padding="longest", truncation=True, return_tensors="pt").to(device) for episode in episodes]
34
  episode_lengths = [t["attention_mask"].shape[0] for t in tokenized_episodes]