kadirnar commited on
Commit
847e393
1 Parent(s): 139801d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -126,15 +126,16 @@ with app:
126
  audio_whisper = gr.Dropdown(choices=whisper_model_list, value=whisper_model_list[0], label='Audio Model')
127
  audio_lang = gr.Dropdown(lang_list, value="English", label="Base Language")
128
  audio_m2m100 = gr.Dropdown(choices=lang_model_list, value=lang_model_list[1], label='Language Model')
129
- audio_button = gr.Button(value="Predict")
130
-
131
- with gr.Column():
132
- prompt_text = gr.Textbox(lines=3, label="Prompt")
133
- output_text = gr.Textbox(lines=3, label="BioGpt Text")
134
- translated_text = gr.Textbox(lines=3,label="Translated Text")
135
-
136
- gr.Examples(examples, inputs=[input_text, text_biogpt, text_m2m100,text_lang], outputs=[prompt_text, output_text, translated_text], fn=biogpt_text, cache_examples=True)
 
137
  text_button.click(biogpt_text, inputs=[input_text, text_biogpt, text_m2m100 ,text_lang], outputs=[prompt_text, output_text, translated_text])
138
  audio_button.click(biogpt_audio, inputs=[input_audio, audio_biogpt, audio_whisper, audio_lang, audio_m2m100], outputs=[prompt_text, output_text, translated_text])
139
 
140
- app.launch()
 
126
  audio_whisper = gr.Dropdown(choices=whisper_model_list, value=whisper_model_list[0], label='Audio Model')
127
  audio_lang = gr.Dropdown(lang_list, value="English", label="Base Language")
128
  audio_m2m100 = gr.Dropdown(choices=lang_model_list, value=lang_model_list[1], label='Language Model')
129
+ audio_button = gr.Button(value="Predict")
130
+
131
+ with gr.Tab("Audio"):
132
+ with gr.Column():
133
+ prompt_text = gr.Textbox(lines=3, label="Prompt")
134
+ output_text = gr.Textbox(lines=3, label="BioGpt Text")
135
+ translated_text = gr.Textbox(lines=3,label="Translated Text")
136
+
137
+ 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)
138
  text_button.click(biogpt_text, inputs=[input_text, text_biogpt, text_m2m100 ,text_lang], outputs=[prompt_text, output_text, translated_text])
139
  audio_button.click(biogpt_audio, inputs=[input_audio, audio_biogpt, audio_whisper, audio_lang, audio_m2m100], outputs=[prompt_text, output_text, translated_text])
140
 
141
+ app.launch()