Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,18 +11,22 @@ def get_text_ai(json_input):
|
|
| 11 |
api_name="/predict"
|
| 12 |
)
|
| 13 |
return result
|
|
|
|
|
|
|
|
|
|
| 14 |
def get_url_speech(json_input,text):
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
text=text,
|
| 21 |
name_model=model,
|
| 22 |
speaking_rate=speaking_rate,
|
| 23 |
api_name="/predict"
|
| 24 |
)
|
| 25 |
-
|
|
|
|
| 26 |
def greet(json_input):
|
| 27 |
|
| 28 |
res=get_text_ai(json_input)
|
|
|
|
| 11 |
api_name="/predict"
|
| 12 |
)
|
| 13 |
return result
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
|
| 17 |
def get_url_speech(json_input,text):
|
| 18 |
+
space_speech = json_input.get("space_speech", "")
|
| 19 |
+
model = json_input.get("model", "")
|
| 20 |
+
speaking_rate=json_input.get("speaking_rate", "")
|
| 21 |
+
client = Client(space_speech)
|
| 22 |
+
result = client.predict(
|
| 23 |
text=text,
|
| 24 |
name_model=model,
|
| 25 |
speaking_rate=speaking_rate,
|
| 26 |
api_name="/predict"
|
| 27 |
)
|
| 28 |
+
|
| 29 |
+
return result
|
| 30 |
def greet(json_input):
|
| 31 |
|
| 32 |
res=get_text_ai(json_input)
|