kadirnar commited on
Commit
9cab6c0
1 Parent(s): e2bf530

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -113,26 +113,26 @@ with app:
113
  with gr.Column():
114
  with gr.Tab("Text"):
115
  input_text = gr.Textbox(lines=3, value="COVID-19 is", label="Text")
116
- input_text_button = gr.Button(value="Predict")
117
- input_biogpt_model = gr.Dropdown(choices=biogpt_model_list, value=biogpt_model_list[0], label='BioGpt Model')
118
- input_m2m100_model = gr.Dropdown(choices=lang_model_list, value=lang_model_list[1], label='Language Model')
119
- input_base_lang = gr.Dropdown(lang_list, value="English", label="Base Language")
120
 
121
  with gr.Tab("Audio"):
122
  input_audio = gr.Audio(source="microphone", type="filepath", label='Audio')
123
- input_biogpt_model = gr.Dropdown(choices=biogpt_model_list, value=biogpt_model_list[0], label='BioGpt Model')
124
- input_whisper_model = gr.Dropdown(choices=whisper_model_list, value=whisper_model_list[0], label='Audio Model')
125
- input_base_lang = gr.Dropdown(lang_list, value="English", label="Base Language")
126
- input_m2m100_model = gr.Dropdown(choices=lang_model_list, value=lang_model_list[1], label='Language Model')
127
- input_audio_button = gr.Button(value="Predict")
128
 
129
  with gr.Column():
130
  prompt_text = gr.Textbox(lines=3, label="Prompt")
131
  output_text = gr.Textbox(lines=3, label="BioGpt Text")
132
  translated_text = gr.Textbox(lines=3,label="Translated Text")
133
 
134
- gr.Examples(examples, inputs=[input_text, input_biogpt_model, input_m2m100_model,input_base_lang], outputs=[prompt_text, output_text, translated_text], fn=biogpt_text, cache_examples=False)
135
  input_text_button.click(biogpt_text, inputs=[input_text, input_biogpt_model, input_m2m100_model,input_base_lang], outputs=[prompt_text, output_text, translated_text])
136
- input_audio_button.click(biogpt_audio, inputs=[input_audio, input_biogpt_model, input_whisper_model,input_base_lang, input_m2m100_model], outputs=[prompt_text, output_text, translated_text])
137
 
138
  app.launch()
 
113
  with gr.Column():
114
  with gr.Tab("Text"):
115
  input_text = gr.Textbox(lines=3, value="COVID-19 is", label="Text")
116
+ text_biogpt = gr.Dropdown(choices=biogpt_model_list, value=biogpt_model_list[0], label='BioGpt Model')
117
+ text_m2m100 = gr.Dropdown(choices=lang_model_list, value=lang_model_list[1], label='Language Model')
118
+ text_lang = gr.Dropdown(lang_list, value="English", label="Base Language")
119
+ text_button = gr.Button(value="Predict")
120
 
121
  with gr.Tab("Audio"):
122
  input_audio = gr.Audio(source="microphone", type="filepath", label='Audio')
123
+ audio_biogpt = gr.Dropdown(choices=biogpt_model_list, value=biogpt_model_list[0], label='BioGpt Model')
124
+ audio_whisper = gr.Dropdown(choices=whisper_model_list, value=whisper_model_list[0], label='Audio Model')
125
+ audio_lang = gr.Dropdown(lang_list, value="English", label="Base Language")
126
+ audio_m2m100 = gr.Dropdown(choices=lang_model_list, value=lang_model_list[1], label='Language Model')
127
+ audio_button = gr.Button(value="Predict")
128
 
129
  with gr.Column():
130
  prompt_text = gr.Textbox(lines=3, label="Prompt")
131
  output_text = gr.Textbox(lines=3, label="BioGpt Text")
132
  translated_text = gr.Textbox(lines=3,label="Translated Text")
133
 
134
+ gr.Examples(examples, inputs=[input_text, text_biogpt, text_m2m100,text_lang], outputs=[prompt_text, output_text, translated_text], fn=biogpt_text, cache_examples=False)
135
  input_text_button.click(biogpt_text, inputs=[input_text, input_biogpt_model, input_m2m100_model,input_base_lang], outputs=[prompt_text, output_text, translated_text])
136
+ input_audio_button.click(biogpt_audio, inputs=[input_audio, audio_biogpt, audio_whisper, audio_lang, audio_m2m100], outputs=[prompt_text, output_text, translated_text])
137
 
138
  app.launch()