istassiy commited on
Commit
e1fd88d
·
1 Parent(s): bcb425b

commit from

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 = AutoModel.from_pretrained(my_model_name)
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):