Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -85,10 +85,10 @@ class ToxicityDataset(Dataset):
|
|
85 |
|
86 |
# Based on user model selection, prepare Dataset and DataLoader
|
87 |
MAX_LENGTH = 100
|
88 |
-
|
89 |
infer_dataset = ToxicityDataset(tweet_df, tokenizer, MAX_LENGTH)
|
90 |
-
infer_params = {"batch_size":
|
91 |
-
infer_loader = DataLoader(
|
92 |
|
93 |
# Freeze model and input tokens
|
94 |
def inference():
|
|
|
85 |
|
86 |
# Based on user model selection, prepare Dataset and DataLoader
|
87 |
MAX_LENGTH = 100
|
88 |
+
INFER_BATCH_SIZE = 128
|
89 |
infer_dataset = ToxicityDataset(tweet_df, tokenizer, MAX_LENGTH)
|
90 |
+
infer_params = {"batch_size": INFER_BATCH_SIZE, "shuffle": False}
|
91 |
+
infer_loader = DataLoader(infer_dataset, **test_params)
|
92 |
|
93 |
# Freeze model and input tokens
|
94 |
def inference():
|