unikud / app.py
malper's picture
Update app.py
2e5f9f0
raw
history blame
578 Bytes
import streamlit as st
from unikud.framework import Unikud
with st.spinner('Loading UNIKUD framework...'):
u = Unikud()
st.success('Loaded!')
text = st.text_area('Enter Hebrew text, and press ctrl/command+enter to add nikud:')
kwargs = {
'v_thresh': st.sidebar.slider("Vowel addition threshold", min_value=0., max_value=1., value=0.5),
'o_thresh': st.sidebar.slider("Other diacritic threshold", min_value=0., max_value=1., value=0.5),
'd_thresh': st.sidebar.slider("Deletion threshold", min_value=0., max_value=1., value=0.5)
}
if text:
st.write(u(text, **kwargs))