nebiyu29 commited on
Commit
2dab15b
1 Parent(s): eeac5cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -7,9 +7,10 @@ tokenizer=AutoTokenizer.from_pretrained(model_name)
7
  model=AutoModelForSequenceClassification.from_pretrained(model_name)
8
 
9
  #this where the model is active and we need to make the gradiends in active
10
- model.eval()
11
- with torch.no_grad():
12
- def model_classifier(text):
 
13
  if len(text)==0:
14
  return f"the input text is {text}"
15
  else:
 
7
  model=AutoModelForSequenceClassification.from_pretrained(model_name)
8
 
9
  #this where the model is active and we need to make the gradiends in active
10
+
11
+ def model_classifier(text):
12
+ model.eval()
13
+ with torch.no_grad():
14
  if len(text)==0:
15
  return f"the input text is {text}"
16
  else: