unikud / app.py
malper's picture
Update app.py
d4acaf4
raw
history blame
No virus
626 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:')
text = text.replace('\r', '').replace('\n', ' ')
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))