Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,8 @@ def analyze_sentiment(text):
|
|
25 |
|
26 |
from transformers import pipeline
|
27 |
|
28 |
-
|
|
|
29 |
translator_hi = pipeline("translation", model="Helsinki-NLP/opus-mt-en-hi")
|
30 |
translator_fr = pipeline("translation", model="Helsinki-NLP/opus-mt-en-fr")
|
31 |
translator_de = pipeline("translation", model="Helsinki-NLP/opus-mt-en-de")
|
@@ -46,6 +47,7 @@ def translate(text, lang):
|
|
46 |
return "Unsupported language."
|
47 |
|
48 |
|
|
|
49 |
def transcribe_audio(audio):
|
50 |
result = speech_to_text(audio)
|
51 |
return result['text']
|
|
|
25 |
|
26 |
from transformers import pipeline
|
27 |
|
28 |
+
# Updated Translation Pipelines
|
29 |
+
translator_ta = pipeline("translation", model="facebook/nllb-200-distilled-600M", src_lang="eng_Latn", tgt_lang="tam_Taml")
|
30 |
translator_hi = pipeline("translation", model="Helsinki-NLP/opus-mt-en-hi")
|
31 |
translator_fr = pipeline("translation", model="Helsinki-NLP/opus-mt-en-fr")
|
32 |
translator_de = pipeline("translation", model="Helsinki-NLP/opus-mt-en-de")
|
|
|
47 |
return "Unsupported language."
|
48 |
|
49 |
|
50 |
+
|
51 |
def transcribe_audio(audio):
|
52 |
result = speech_to_text(audio)
|
53 |
return result['text']
|