Irpan commited on
Commit
ea0e1cd
·
1 Parent(s): 716237b
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import gradio as gr
2
  import random
 
3
 
4
 
5
  # Lists of Uyghur short and long texts
@@ -15,7 +16,7 @@ long_texts = [
15
  # Functions
16
  def generate_text(type, script_choice):
17
  """Generate a random Uyghur short or long text based on type."""
18
- from umsc import UgMultiScriptConverter
19
  ug_arab_to_latn = UgMultiScriptConverter('UAS', 'ULS')
20
  if type == "short":
21
  if script_choice == "Uyghur Arabic":
@@ -120,13 +121,13 @@ with gr.Blocks() as app:
120
  generate_short_btn.click(
121
  generate_text,
122
  inputs=["short", script_choice],
123
- outputs=input_text
124
  )
125
 
126
  generate_long_btn.click(
127
  generate_text,
128
  inputs=["long", script_choice],
129
- outputs=input_text
130
  )
131
 
132
  tts_btn.click(
 
1
  import gradio as gr
2
  import random
3
+ from umsc import UgMultiScriptConverter
4
 
5
 
6
  # Lists of Uyghur short and long texts
 
16
  # Functions
17
  def generate_text(type, script_choice):
18
  """Generate a random Uyghur short or long text based on type."""
19
+
20
  ug_arab_to_latn = UgMultiScriptConverter('UAS', 'ULS')
21
  if type == "short":
22
  if script_choice == "Uyghur Arabic":
 
121
  generate_short_btn.click(
122
  generate_text,
123
  inputs=["short", script_choice],
124
+ outputs=[input_text]
125
  )
126
 
127
  generate_long_btn.click(
128
  generate_text,
129
  inputs=["long", script_choice],
130
+ outputs=[input_text]
131
  )
132
 
133
  tts_btn.click(