Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ synthesiser = pipeline("text-to-speech", model_id) # Use GPU if available
|
|
21 |
# Custom function to split Tibetan text into sentences
|
22 |
def prepare_sentences(text, lang="bod"):
|
23 |
# Convert Tibetan punctuation "།" into a period to help split sentences
|
24 |
-
text = text.replace("།", ".")
|
25 |
|
26 |
# Split the text into sentences based on the periods
|
27 |
sentences = [sentence.strip() for sentence in text.split('.') if sentence.strip()]
|
|
|
21 |
# Custom function to split Tibetan text into sentences
|
22 |
def prepare_sentences(text, lang="bod"):
|
23 |
# Convert Tibetan punctuation "།" into a period to help split sentences
|
24 |
+
text = text.replace("། ", ".")
|
25 |
|
26 |
# Split the text into sentences based on the periods
|
27 |
sentences = [sentence.strip() for sentence in text.split('.') if sentence.strip()]
|