Cicciokr commited on
Commit
1705a9a
·
verified ·
1 Parent(s): dda8d7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -26,10 +26,8 @@ if input_text:
26
  for pred in predictions:
27
  st.write(f"**Parola**: {pred['token_str']}, **Probabilità**: {pred['score']:.4f}")
28
 
29
-
30
- fill_mask_due = pipeline("fill-mask", model="./models/latin_bert/")
31
- if input_text:
32
- predictions_due = fill_mask_due(input_text)
33
  st.subheader("Risultati delle previsioni con Latin Bert:")
34
- for pred in predictions_due:
35
- st.write(f"**Parola**: {pred['token_str']}, **Probabilità**: {pred['score']:.4f}")
 
 
 
26
  for pred in predictions:
27
  st.write(f"**Parola**: {pred['token_str']}, **Probabilità**: {pred['score']:.4f}")
28
 
 
 
 
 
29
  st.subheader("Risultati delle previsioni con Latin Bert:")
30
+ path_to_latin_bert = "./models/latin_bert/"
31
+ unmasker = pipeline('fill-mask', model=path_to_latin_bert)
32
+ result = unmasker("""dvces et reges carthaginiensivm hanno et mago qui [MASK] punico bello cornelium consulem aput liparas ceperunt""")
33
+ print(result)