Cicciokr commited on
Commit
b5fe0df
·
verified ·
1 Parent(s): 1deb871

utilizzo del modello LuisAVasquez/simple-latin-bert-uncased

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -12,12 +12,13 @@ st.write("Inserisci un testo con il token [MASK] per vedere le previsioni del mo
12
 
13
  input_text = st.text_input("Testo:", value="Lorem ipsum dolor sit amet, [MASK] adipiscing elit.")
14
 
15
- modelname = "./models/latin_bert/"
16
- model = AutoModelForMaskedLM.from_pretrained(modelname, local_files_only=True)
 
 
17
  # Creare un pipeline di riempimento maschere
18
- tokenizer = AutoTokenizer.from_pretrained("./models/subword_tokenizer_latin/", local_files_only=True)
19
-
20
  fill_mask = pipeline("fill-mask", model=model, tokenizer=tokenizer)
 
21
 
22
  if input_text:
23
  predictions = fill_mask(input_text)
 
12
 
13
  input_text = st.text_input("Testo:", value="Lorem ipsum dolor sit amet, [MASK] adipiscing elit.")
14
 
15
+ #modelname = "./models/latin_bert/"
16
+ modelname = "LuisAVasquez/simple-latin-bert-uncased"
17
+ tokenizer = AutoTokenizer.from_pretrained(modelname)
18
+ model = AutoModelForMaskedLM.from_pretrained(modelname)
19
  # Creare un pipeline di riempimento maschere
 
 
20
  fill_mask = pipeline("fill-mask", model=model, tokenizer=tokenizer)
21
+ #fill_mask = pipeline("fill-mask", model=modelname)
22
 
23
  if input_text:
24
  predictions = fill_mask(input_text)