Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -162,7 +162,7 @@ def transcribe_and_translate(audio):
|
|
| 162 |
|
| 163 |
# Translation
|
| 164 |
en_sents = [malayalam_text]
|
| 165 |
-
src_lang, tgt_lang = "
|
| 166 |
translations = batch_translate(en_sents, src_lang, tgt_lang, indic_en_model, indic_en_tokenizer, ip)
|
| 167 |
|
| 168 |
# Compute Multilingual Semantic Similarity (Malayalam → English → Malayalam)
|
|
@@ -177,7 +177,7 @@ iface = gr.Interface(
|
|
| 177 |
gr.Audio(sources=["microphone", "upload"], type="filepath"), # Only audio input
|
| 178 |
],
|
| 179 |
outputs=[
|
| 180 |
-
gr.Textbox(label="
|
| 181 |
gr.Textbox(label="English Translation"),
|
| 182 |
gr.Textbox(label="Semantic Similarity (%)"), # Automatically computed
|
| 183 |
],
|
|
|
|
| 162 |
|
| 163 |
# Translation
|
| 164 |
en_sents = [malayalam_text]
|
| 165 |
+
src_lang, tgt_lang = "eng_Latn", "eng_Latn"
|
| 166 |
translations = batch_translate(en_sents, src_lang, tgt_lang, indic_en_model, indic_en_tokenizer, ip)
|
| 167 |
|
| 168 |
# Compute Multilingual Semantic Similarity (Malayalam → English → Malayalam)
|
|
|
|
| 177 |
gr.Audio(sources=["microphone", "upload"], type="filepath"), # Only audio input
|
| 178 |
],
|
| 179 |
outputs=[
|
| 180 |
+
gr.Textbox(label="English Translation"),
|
| 181 |
gr.Textbox(label="English Translation"),
|
| 182 |
gr.Textbox(label="Semantic Similarity (%)"), # Automatically computed
|
| 183 |
],
|