umang018 commited on
Commit
175710c
·
verified ·
1 Parent(s): 602bb55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -25,7 +25,7 @@ emotion_labels = ["admiration", "amusement", "anger", "annoyance", "approval",
25
  def classify_emotions_in_batches(texts, batch_size=64):
26
  results = []
27
  start_time = time.time()
28
- for i in range(0, len(texts), batch_size):
29
  batch = texts[i:i+batch_size]
30
  inputs = tokenizer(batch, return_tensors="pt", truncation=True, padding=True).to(device)
31
  with torch.no_grad():
 
25
  def classify_emotions_in_batches(texts, batch_size=64):
26
  results = []
27
  start_time = time.time()
28
+ for i in range(0, 1280, batch_size):
29
  batch = texts[i:i+batch_size]
30
  inputs = tokenizer(batch, return_tensors="pt", truncation=True, padding=True).to(device)
31
  with torch.no_grad():