Spaces:
Runtime error
Runtime error
commit from
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
import numpy as np
|
3 |
import torch
|
4 |
-
from transformers import AutoTokenizer, AutoModel
|
5 |
|
6 |
my_model_name = "istassiy/ysda_2022_ml2_hw3_distilbert_base_uncased"
|
7 |
|
@@ -46,7 +46,7 @@ def load_tokenizer():
|
|
46 |
|
47 |
@st.cache(allow_output_mutation=True)
|
48 |
def load_model():
|
49 |
-
model =
|
50 |
return model
|
51 |
|
52 |
def sigmoid(x):
|
|
|
1 |
import streamlit as st
|
2 |
import numpy as np
|
3 |
import torch
|
4 |
+
from transformers import AutoTokenizer, AutoModel, DistilBertForSequenceClassification
|
5 |
|
6 |
my_model_name = "istassiy/ysda_2022_ml2_hw3_distilbert_base_uncased"
|
7 |
|
|
|
46 |
|
47 |
@st.cache(allow_output_mutation=True)
|
48 |
def load_model():
|
49 |
+
model = DistilBertForSequenceClassification.from_pretrained(my_model_name)
|
50 |
return model
|
51 |
|
52 |
def sigmoid(x):
|