Spaces:
Running
on
Zero
Running
on
Zero
mrfakename
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -498,8 +498,12 @@ def synthandreturn(text):
|
|
498 |
print("[debug] Using", mdl1, mdl2)
|
499 |
def predict_and_update_result(text, model, result_storage):
|
500 |
result = router.predict(text, AVAILABLE_MODELS[model].lower(), api_name="/synthesize")
|
501 |
-
|
502 |
result_storage[model] = result
|
|
|
|
|
|
|
|
|
503 |
results = {}
|
504 |
thread1 = threading.Thread(target=predict_and_update_result, args=(text, mdl1, results))
|
505 |
thread2 = threading.Thread(target=predict_and_update_result, args=(text, mdl2, results))
|
|
|
498 |
print("[debug] Using", mdl1, mdl2)
|
499 |
def predict_and_update_result(text, model, result_storage):
|
500 |
result = router.predict(text, AVAILABLE_MODELS[model].lower(), api_name="/synthesize")
|
501 |
+
print('Done with', model)
|
502 |
result_storage[model] = result
|
503 |
+
try:
|
504 |
+
doloudnorm(result)
|
505 |
+
except:
|
506 |
+
pass
|
507 |
results = {}
|
508 |
thread1 = threading.Thread(target=predict_and_update_result, args=(text, mdl1, results))
|
509 |
thread2 = threading.Thread(target=predict_and_update_result, args=(text, mdl2, results))
|