Spaces:
No application file
No application file
Update sentiment.py
Browse files- sentiment.py +1 -1
sentiment.py
CHANGED
|
@@ -34,7 +34,7 @@ def preprocess(text):
|
|
| 34 |
return " ".join(new_text)
|
| 35 |
|
| 36 |
# Batch prediction function (optimized for performance)
|
| 37 |
-
def predict_sentiment_batch(texts: list, batch_size: int =
|
| 38 |
if not isinstance(texts, list):
|
| 39 |
raise TypeError(f"Expected list of texts, got {type(texts)}")
|
| 40 |
|
|
|
|
| 34 |
return " ".join(new_text)
|
| 35 |
|
| 36 |
# Batch prediction function (optimized for performance)
|
| 37 |
+
def predict_sentiment_batch(texts: list, batch_size: int = 32) -> list:
|
| 38 |
if not isinstance(texts, list):
|
| 39 |
raise TypeError(f"Expected list of texts, got {type(texts)}")
|
| 40 |
|