Gregoryjr
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ if con:
|
|
30 |
tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")
|
31 |
model = AutoModelForSequenceClassification.from_pretrained("Greys/milestonemodel")
|
32 |
|
33 |
-
def classify_sentence(
|
34 |
inputs = tokenizer(sentence, return_tensors="pt")
|
35 |
outputs = model(**inputs)
|
36 |
probs = outputs.logits.softmax(dim=1)
|
|
|
30 |
tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")
|
31 |
model = AutoModelForSequenceClassification.from_pretrained("Greys/milestonemodel")
|
32 |
|
33 |
+
def classify_sentence(text):
|
34 |
inputs = tokenizer(sentence, return_tensors="pt")
|
35 |
outputs = model(**inputs)
|
36 |
probs = outputs.logits.softmax(dim=1)
|