Spaces:
Running
Running
mrfakename
commited on
Commit
•
6436502
1
Parent(s):
264149b
Update app.py
Browse files
app.py
CHANGED
@@ -542,7 +542,10 @@ def synthandreturn(text):
|
|
542 |
print("[debug] Using", mdl1, mdl2)
|
543 |
def predict_and_update_result(text, model, result_storage):
|
544 |
try:
|
545 |
-
|
|
|
|
|
|
|
546 |
except:
|
547 |
raise gr.Error('Unable to call API, please try again :)')
|
548 |
print('Done with', model)
|
|
|
542 |
print("[debug] Using", mdl1, mdl2)
|
543 |
def predict_and_update_result(text, model, result_storage):
|
544 |
try:
|
545 |
+
if model in AVAILABLE_MODELS:
|
546 |
+
result = router.predict(text, AVAILABLE_MODELS[model].lower(), api_name="/synthesize")
|
547 |
+
else:
|
548 |
+
result = router.predict(text, model.lower(), api_name="/synthesize")
|
549 |
except:
|
550 |
raise gr.Error('Unable to call API, please try again :)')
|
551 |
print('Done with', model)
|