NeerAbhy commited on
Commit
ac81201
·
verified ·
1 Parent(s): 29afa6c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -134,8 +134,8 @@ def translation_text(src_lang, trg_lang, user_input):
134
  generated_tokens, skip_special_tokens=True)[0]
135
  return translated_text
136
 
137
- def print_s(source_lang):
138
- return lang_id[source_lang]
139
  demo = gr.Blocks()
140
 
141
  with demo:
@@ -157,6 +157,6 @@ with demo:
157
  b1.click(audio_a_text, inputs=audio, outputs=text)
158
 
159
  b2 = gr.Button("Classification of speech")
160
- b2.click(print_s, inputs= source_lang, outputs=text)
161
 
162
  demo.launch()
 
134
  generated_tokens, skip_special_tokens=True)[0]
135
  return translated_text
136
 
137
+ def print_s(source_lang, target_lang):
138
+ return lang_id[source_lang], lang_id[target_lang]
139
  demo = gr.Blocks()
140
 
141
  with demo:
 
157
  b1.click(audio_a_text, inputs=audio, outputs=text)
158
 
159
  b2 = gr.Button("Classification of speech")
160
+ b2.click(print_s, inputs= source_lang,target_lang, outputs=text)
161
 
162
  demo.launch()