Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from gradio_client import Client
|
|
4 |
|
5 |
MY_HF_TOKEN_KEY = os.environ["MY_HF_TOKEN_KEY"]
|
6 |
|
7 |
-
client = Client("Ghana-NLP/
|
8 |
|
9 |
def generate(text, speaker):
|
10 |
output = client.predict(text, speaker)
|
@@ -13,13 +13,13 @@ def generate(text, speaker):
|
|
13 |
title = "GhanaNLP: Speech Synthesis"
|
14 |
|
15 |
description = """
|
16 |
-
<b>How to use:</b> Enter some
|
17 |
"""
|
18 |
|
19 |
examples = [
|
20 |
-
["
|
21 |
-
["
|
22 |
-
["
|
23 |
]
|
24 |
|
25 |
gr.Interface(
|
@@ -27,11 +27,11 @@ gr.Interface(
|
|
27 |
inputs=[
|
28 |
gr.Text(label="Input Text"),
|
29 |
gr.Radio(label="Speaker", choices=[
|
30 |
-
"
|
31 |
-
"
|
32 |
-
"
|
33 |
],
|
34 |
-
value="
|
35 |
],
|
36 |
outputs=[
|
37 |
gr.Audio(label="Generated Speech", type="filepath"),
|
|
|
4 |
|
5 |
MY_HF_TOKEN_KEY = os.environ["MY_HF_TOKEN_KEY"]
|
6 |
|
7 |
+
client = Client("Ghana-NLP/ewe-tts",hf_token=MY_HF_TOKEN_KEY)
|
8 |
|
9 |
def generate(text, speaker):
|
10 |
output = client.predict(text, speaker)
|
|
|
13 |
title = "GhanaNLP: Speech Synthesis"
|
14 |
|
15 |
description = """
|
16 |
+
<b>How to use:</b> Enter some Ewe text and choose a speaker.
|
17 |
"""
|
18 |
|
19 |
examples = [
|
20 |
+
["Gbe ma gbe fiẽ la, wowu alẽ, nyi kple nyivi siwo woha le aʋa la me eye woɖu woƒe lã kple ʋua katã nenema.", "ee_1"],
|
21 |
+
["Tete mese gbe gã aɖe tso fiazikpui la gbɔ le gbɔgblɔm be, “Kpɔ ɖa, Mawu ƒe nɔƒe le amegbetɔwo dome azɔ, eye wòanɔ wo gbɔ. Woanye eƒe dukɔ, Mawu ŋutɔ anɔ wo gbɔ, eye wòanye woƒe Mawu.", "ee_2"],
|
22 |
+
["Eƒe ɣedzeƒeliƒo ƒe afã le dzigbeme gome tso Tapua, to Kana tɔʋu la ŋu yi ɖatɔ Domeƒu la. Esia nye Efraimviwo ƒe to la ƒe anyigba le woƒe ƒomeawo nu.", "ee_3"],
|
23 |
]
|
24 |
|
25 |
gr.Interface(
|
|
|
27 |
inputs=[
|
28 |
gr.Text(label="Input Text"),
|
29 |
gr.Radio(label="Speaker", choices=[
|
30 |
+
"ee_1",
|
31 |
+
"ee_2",
|
32 |
+
"ee_3",
|
33 |
],
|
34 |
+
value="ee_1"),
|
35 |
],
|
36 |
outputs=[
|
37 |
gr.Audio(label="Generated Speech", type="filepath"),
|