sotosbarl commited on
Commit
bedfda3
1 Parent(s): ef33a98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -7,7 +7,7 @@ model_name = "MoritzLaurer/mDeBERTa-v3-base-mnli-xnli"
7
  tokenizer = AutoTokenizer.from_pretrained(model_name)
8
  model = AutoModelForSequenceClassification.from_pretrained(model_name)
9
 
10
- def classify(text)
11
  input = tokenizer(text, truncation=True, return_tensors="pt")
12
  output = model(input["input_ids"].to(device)) # device = "cuda:0" or "cpu"
13
  prediction = torch.softmax(output["logits"][0], -1).tolist()
 
7
  tokenizer = AutoTokenizer.from_pretrained(model_name)
8
  model = AutoModelForSequenceClassification.from_pretrained(model_name)
9
 
10
+ def classify(text):
11
  input = tokenizer(text, truncation=True, return_tensors="pt")
12
  output = model(input["input_ids"].to(device)) # device = "cuda:0" or "cpu"
13
  prediction = torch.softmax(output["logits"][0], -1).tolist()