Update app.py
Browse files
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,
|
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():
|