Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -24,8 +24,8 @@ def img2text(url):
|
|
24 |
|
25 |
def generate_story(scenario):
|
26 |
template = """
|
27 |
-
|
28 |
-
|
29 |
|
30 |
CONTEXT: {scenario}
|
31 |
STORY:
|
@@ -46,8 +46,8 @@ def generate_story(scenario):
|
|
46 |
#text to speech
|
47 |
|
48 |
def text2speech(message):
|
49 |
-
API_URL = "https://api-inference.huggingface.co/models/espnet/kan-bayashi_ljspeech_vits"
|
50 |
-
|
51 |
headers = {"Authorization": f"Bearer {HUGGINGFACEHUB_API_TOKEN}"}
|
52 |
payloads = {
|
53 |
"inputs": message
|
|
|
24 |
|
25 |
def generate_story(scenario):
|
26 |
template = """
|
27 |
+
Vous êtes un conteur ;
|
28 |
+
Vous pouvez créer une histoire courte à partir d'un récit simple. L'histoire ne doit pas dépasser 50 mots;
|
29 |
|
30 |
CONTEXT: {scenario}
|
31 |
STORY:
|
|
|
46 |
#text to speech
|
47 |
|
48 |
def text2speech(message):
|
49 |
+
#API_URL = "https://api-inference.huggingface.co/models/espnet/kan-bayashi_ljspeech_vits"
|
50 |
+
API_URL = "https://api-inference.huggingface.co/models/facebook/mms-tts-fra"
|
51 |
headers = {"Authorization": f"Bearer {HUGGINGFACEHUB_API_TOKEN}"}
|
52 |
payloads = {
|
53 |
"inputs": message
|