thewh1teagle commited on
Commit
8ab6bc6
·
verified ·
1 Parent(s): 1c30d8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -1
app.py CHANGED
@@ -1 +1,18 @@
1
- from dicta_onnx import Dicta
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from dicta_onnx import Dicta
3
+
4
+ dicta = Dicta('./dicta-1.0.int8.onnx')
5
+
6
+ def add_diacritics(text):
7
+ return dicta.add_diacritics(text)
8
+
9
+ iface = gr.Interface(
10
+ fn=add_diacritics,
11
+ inputs=gr.Textbox(placeholder='Type text without diacritics', lines=3, rtl=True),
12
+ outputs=gr.Textbox(label='Text with diacritics', rtl=True),
13
+ title='Add diacritics to Hebrew text',
14
+ description='Type and press the button to add diacritics.',
15
+ live=False,
16
+ )
17
+
18
+ iface.launch()