Spaces:
Runtime error
Runtime error
changed the condition of the return in the function of model classifier
Browse files
app.py
CHANGED
|
@@ -7,7 +7,7 @@ model=AutoModelfForSequenceClassification.from_pretrained(model_name)
|
|
| 7 |
|
| 8 |
#this where the model is active
|
| 9 |
def model_classifier(text):
|
| 10 |
-
if text
|
| 11 |
return f"the input text is {text}"
|
| 12 |
else:
|
| 13 |
encoded_input=tokenizer(text) #this is where the encoding happens
|
|
|
|
| 7 |
|
| 8 |
#this where the model is active
|
| 9 |
def model_classifier(text):
|
| 10 |
+
if len(text)==0:
|
| 11 |
return f"the input text is {text}"
|
| 12 |
else:
|
| 13 |
encoded_input=tokenizer(text) #this is where the encoding happens
|