Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
35 |
-
|
|
|
|
|
|
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)
|