Spaces:
Sleeping
Sleeping
File size: 1,006 Bytes
293544d bfb596c 293544d 430b23d 9539bbe 9b3e2a5 9539bbe bfb596c 293544d bfb596c 430b23d f84a1c9 bfb596c 9539bbe bfb596c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
from camel_tools.utils.charmap import CharMapper
import gradio as gr
ar2bw = CharMapper.builtin_mapper('ar2bw')
bw2ar = CharMapper.builtin_mapper('bw2ar')
title = """#Transliterate using BuckWater Scheme"""
description = """
This app converts transliterated arabic text to Arabic using BuckWater Scheme. Use the following image to familiarize yourself with the conversion system.

"""
example = [["*hbt <lY Almktbp."]]
def getArabic(transliteration):
return bw2ar(transliteration)
with gr.Blocks() as demo:
gr.Markdown(title)
gr.Markdown(description)
name = gr.Textbox(label="English Transliteration (Using Buckwater System )")
output = gr.Textbox(label="Arabic Form of Text")
greet_btn = gr.Button("Get Arabic")
greet_btn.click(fn=getArabic, inputs=name, outputs=output)
examples = gr.Examples(examples = example, inputs = [name])
demo.launch() |