Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,8 @@ model = AutoModelForSequenceClassification.from_pretrained("nlptown/bert-base-mu
|
|
12 |
|
13 |
# Define prediction function
|
14 |
def predict(texts):
|
|
|
|
|
15 |
inputs = tokenizer(
|
16 |
texts,
|
17 |
return_tensors="pt",
|
|
|
12 |
|
13 |
# Define prediction function
|
14 |
def predict(texts):
|
15 |
+
if isinstance(texts, str):
|
16 |
+
texts = [texts]
|
17 |
inputs = tokenizer(
|
18 |
texts,
|
19 |
return_tensors="pt",
|