sudoping01 commited on
Commit
c17a91c
·
verified ·
1 Parent(s): 68ec7b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -14,7 +14,8 @@ class BambaraTranslator:
14
  self.flores_codes = {
15
  "French": "fra_Latn",
16
  "English": "eng_Latn",
17
- "Bambara": 'nqo_Nkoo' #"bam_Latn"
 
18
  }
19
 
20
  def translate(self, text: Union[str, List[str]], src_lang: str, tgt_lang: str) -> Union[str, List[str]]:
@@ -63,8 +64,8 @@ with gr.Blocks(title="Bambara Translator") as demo:
63
  )
64
 
65
  with gr.Row():
66
- src_lang = gr.Dropdown(choices=["Bambara", "French", "English"], label="Source Language", value="Bambara")
67
- tgt_lang = gr.Dropdown(choices=["Bambara", "French", "English"], label="Target Language", value="French")
68
  with gr.Column():
69
  text_input = gr.Textbox(label="Input Text", lines=5, placeholder="Type your text here...")
70
  example_dropdown = gr.Dropdown(
 
14
  self.flores_codes = {
15
  "French": "fra_Latn",
16
  "English": "eng_Latn",
17
+ "Bambara_Nko": 'nqo_Nkoo', #"bam_Latn",
18
+ "Bambara_Latin": "bam_Latn"
19
  }
20
 
21
  def translate(self, text: Union[str, List[str]], src_lang: str, tgt_lang: str) -> Union[str, List[str]]:
 
64
  )
65
 
66
  with gr.Row():
67
+ src_lang = gr.Dropdown(choices=["Bambara_Latin", "French", "English", "Bambara_Nko"], label="Source Language", value="Bambara_Nko")
68
+ tgt_lang = gr.Dropdown(choices=[["Bambara_Latin", "French", "English", "Bambara_Nko"], label="Target Language", value="French")
69
  with gr.Column():
70
  text_input = gr.Textbox(label="Input Text", lines=5, placeholder="Type your text here...")
71
  example_dropdown = gr.Dropdown(