File size: 491 Bytes
8ab6bc6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr
from dicta_onnx import Dicta

dicta = Dicta('./dicta-1.0.int8.onnx')

def add_diacritics(text):
    return dicta.add_diacritics(text)

iface = gr.Interface(
    fn=add_diacritics,
    inputs=gr.Textbox(placeholder='Type text without diacritics', lines=3, rtl=True),
    outputs=gr.Textbox(label='Text with diacritics', rtl=True),
    title='Add diacritics to Hebrew text',
    description='Type and press the button to add diacritics.',
    live=False,
)

iface.launch()