Spaces:
Running
Running
Commit
•
5a090e9
1
Parent(s):
26071c8
Update app.py
Browse files
app.py
CHANGED
@@ -32,14 +32,15 @@ def belarusify_russian_text(text: str):
|
|
32 |
|
33 |
import requests
|
34 |
def tts(text: str):
|
|
|
35 |
text = belarusify_russian_text(text)
|
|
|
36 |
# Sending a request to the fonemizer
|
37 |
response = requests.post("http://fonemizer.nikuchin.fun/processText",
|
38 |
data=text,
|
39 |
headers={'Content-Type': 'text/plain'})
|
40 |
if response.status_code != 200:
|
41 |
raise Exception(f"Request to fonemizer failed with status code {response.status_code}")
|
42 |
-
print(response)
|
43 |
print(response.text)
|
44 |
text = response.text
|
45 |
best_model_path = hf_hub_download(repo_id=REPO_ID, filename="model.pth")
|
|
|
32 |
|
33 |
import requests
|
34 |
def tts(text: str):
|
35 |
+
print("Original text: ", text)
|
36 |
text = belarusify_russian_text(text)
|
37 |
+
print("Belarusified text: ", text)
|
38 |
# Sending a request to the fonemizer
|
39 |
response = requests.post("http://fonemizer.nikuchin.fun/processText",
|
40 |
data=text,
|
41 |
headers={'Content-Type': 'text/plain'})
|
42 |
if response.status_code != 200:
|
43 |
raise Exception(f"Request to fonemizer failed with status code {response.status_code}")
|
|
|
44 |
print(response.text)
|
45 |
text = response.text
|
46 |
best_model_path = hf_hub_download(repo_id=REPO_ID, filename="model.pth")
|