Spaces:
Sleeping
Sleeping
model changed
Browse files
app.py
CHANGED
@@ -74,12 +74,12 @@ def preprocess(text):
|
|
74 |
@st.cache_resource()
|
75 |
def get_model():
|
76 |
# Load the model and tokenizer
|
77 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
78 |
-
model = AutoModelForSequenceClassification.from_pretrained("MrDdz/
|
79 |
return tokenizer,model
|
80 |
tokenizer, model = get_model()
|
81 |
|
82 |
-
if
|
83 |
text_sample = tokenizer(text, padding = 'max_length',return_tensors = 'pt')
|
84 |
# print(text_sample)
|
85 |
output = model(**text_sample)
|
|
|
74 |
@st.cache_resource()
|
75 |
def get_model():
|
76 |
# Load the model and tokenizer
|
77 |
+
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
|
78 |
+
model = AutoModelForSequenceClassification.from_pretrained("MrDdz/bert-base-uncased ")
|
79 |
return tokenizer,model
|
80 |
tokenizer, model = get_model()
|
81 |
|
82 |
+
if button:
|
83 |
text_sample = tokenizer(text, padding = 'max_length',return_tensors = 'pt')
|
84 |
# print(text_sample)
|
85 |
output = model(**text_sample)
|