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() | |