Spaces:
Sleeping
Sleeping
Dhahlan2000
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ def translate_Singlish_to_sinhala(text):
|
|
34 |
|
35 |
translated_text = singlish_pipe(f"translate Singlish to Sinhala: {text}", clean_up_tokenization_spaces=False)[0]['generated_text']
|
36 |
|
37 |
-
return translated_text
|
38 |
|
39 |
def translate_english_to_sinhala(text):
|
40 |
# Split the text into sentences or paragraphs
|
@@ -45,7 +45,7 @@ def translate_english_to_sinhala(text):
|
|
45 |
translated_parts.append(translated_part)
|
46 |
# Join the translated parts back together
|
47 |
translated_text = "\n".join(translated_parts)
|
48 |
-
return translated_text.replace("ප් රභූවරුන්", "")
|
49 |
|
50 |
def translate_sinhala_to_english(text):
|
51 |
# Split the text into sentences or paragraphs
|
|
|
34 |
|
35 |
translated_text = singlish_pipe(f"translate Singlish to Sinhala: {text}", clean_up_tokenization_spaces=False)[0]['generated_text']
|
36 |
|
37 |
+
return translated_text.replace('\u200d', '')
|
38 |
|
39 |
def translate_english_to_sinhala(text):
|
40 |
# Split the text into sentences or paragraphs
|
|
|
45 |
translated_parts.append(translated_part)
|
46 |
# Join the translated parts back together
|
47 |
translated_text = "\n".join(translated_parts)
|
48 |
+
return translated_text.replace("ප් රභූවරුන්", "").replace('\u200d', '')
|
49 |
|
50 |
def translate_sinhala_to_english(text):
|
51 |
# Split the text into sentences or paragraphs
|