nebiyu29 commited on
Commit
0b55b56
·
verified ·
1 Parent(s): 241b3cc

changed the condition of the return in the function of model classifier

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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 is "":
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