Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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.
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
|
|
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()
|