Cicciokr commited on
Commit
c7ab302
·
verified ·
1 Parent(s): 80f4beb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,10 +2,10 @@
2
 
3
  #x = st.slider('Select a value')
4
  #st.write(x, 'squared is', x * x)
5
- from transformers import pipeline, BertForQuestionAnswering, AutoTokenizer
6
 
7
- modelname = 'models/latin_bert'
8
- model = BertForQuestionAnswering.from_pretrained(modelname)
9
  # Creare un pipeline di riempimento maschere
10
  tokenizer = AutoTokenizer.from_pretrained(modelname)
11
 
 
2
 
3
  #x = st.slider('Select a value')
4
  #st.write(x, 'squared is', x * x)
5
+ from transformers import pipeline, AutoModelForMaskedLM, AutoTokenizer
6
 
7
+ modelname = "./models/latin_bert/"
8
+ model = AutoModelForMaskedLM.from_pretrained(modelname)
9
  # Creare un pipeline di riempimento maschere
10
  tokenizer = AutoTokenizer.from_pretrained(modelname)
11