FDSRashid commited on
Commit
9539bbe
·
1 Parent(s): dfcc454

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -4,7 +4,18 @@ import gradio as gr
4
  ar2bw = CharMapper.builtin_mapper('ar2bw')
5
  bw2ar = CharMapper.builtin_mapper('bw2ar')
6
 
7
- def getArabic(transliteration = '*hbt <lY Almktbp.'):
 
 
 
 
 
 
 
 
 
 
 
8
  return bw2ar(transliteration)
9
 
10
  with gr.Blocks() as demo:
@@ -12,5 +23,6 @@ with gr.Blocks() as demo:
12
  output = gr.Textbox(label="Arabic Form of Text")
13
  greet_btn = gr.Button("Get Arabic")
14
  greet_btn.click(fn=getArabic, inputs=name, outputs=output)
 
15
 
16
  demo.launch()
 
4
  ar2bw = CharMapper.builtin_mapper('ar2bw')
5
  bw2ar = CharMapper.builtin_mapper('bw2ar')
6
 
7
+ title = "Transliterate using BuckWater Scheme"
8
+ description = """
9
+ <p>
10
+ <center>
11
+ This app converts transliterated arabic text to Arabic using BuckWater Scheme. Use the following image to familiarize yourself with the conversion system.
12
+ <img src="https://huggingface.co/spaces/FDSRashid/Camel_tools_Test/blob/main/Buckwalter-transliteration-for-Arabic-language.jpg" alt="Test" width="200"/>
13
+ </center>
14
+ </p>
15
+ """
16
+ example = [["*hbt <lY Almktbp."]]
17
+
18
+ def getArabic(transliteration):
19
  return bw2ar(transliteration)
20
 
21
  with gr.Blocks() as demo:
 
23
  output = gr.Textbox(label="Arabic Form of Text")
24
  greet_btn = gr.Button("Get Arabic")
25
  greet_btn.click(fn=getArabic, inputs=name, outputs=output)
26
+ examples = gr.Examples(examples = example, inputs = [name])
27
 
28
  demo.launch()