Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
mrfakename
commited on
Commit
•
9dc87ec
1
Parent(s):
1a253bc
Update app.py
Browse files
app.py
CHANGED
@@ -497,8 +497,10 @@ def synthandreturn(text):
|
|
497 |
log_text(text)
|
498 |
print("[debug] Using", mdl1, mdl2)
|
499 |
def predict_and_update_result(text, model, result_storage):
|
500 |
-
|
501 |
-
|
|
|
|
|
502 |
print('Done with', model)
|
503 |
result_storage[model] = result
|
504 |
try:
|
|
|
497 |
log_text(text)
|
498 |
print("[debug] Using", mdl1, mdl2)
|
499 |
def predict_and_update_result(text, model, result_storage):
|
500 |
+
try:
|
501 |
+
result = router.predict(text, AVAILABLE_MODELS[model].lower(), api_name="/synthesize")
|
502 |
+
except:
|
503 |
+
raise gr.Error('Unable to call API, please try again :)')
|
504 |
print('Done with', model)
|
505 |
result_storage[model] = result
|
506 |
try:
|