Commit ·
5a8706b
1
Parent(s): cbfd352
space building stage protection on restart
Browse files211 unmodified lines212213214215216217218219220137 unmodified lines358359360361362363364211 unmodified linesf"Unrecoverable exception caused by language:{DEVICE_ASSERT_LANG} prompt:{DEVICE_ASSERT_PROMPT}")#print("RESTARTING SPACE")## HF Space specific.. This error is unrecoverable need to restart space#api.restart_space(repo_id=repo_id)try:metrics_text = ""t_latent = time.time()137 unmodified lines)# HF Space specific.. This error is unrecoverable need to restart spaceapi.restart_space(repo_id=repo_id)else:if "Failed to decode" in str(e):print("Speaker encoding error", str(e))211 unmodified lines212213214215216217218219220221222223224137 unmodified lines362363364365366367368369370371372373211 unmodified linesf"Unrecoverable exception caused by language:{DEVICE_ASSERT_LANG} prompt:{DEVICE_ASSERT_PROMPT}")# HF Space specific.. This error is unrecoverable need to restart spacespace = api.get_space_runtime(repo_id=repo_id)if space.stage!="BUILDING":api.restart_space(repo_id=repo_id)else:print("TRIED TO RESTART but space is building")try:metrics_text = ""t_latent = time.time()137 unmodified lines)# HF Space specific.. This error is unrecoverable need to restart spacespace = api.get_space_runtime(repo_id=repo_id)if space.stage!="BUILDING":api.restart_space(repo_id=repo_id)else:print("TRIED TO RESTART but space is building")else:if "Failed to decode" in str(e):print("Speaker encoding error", str(e))
app.py+13-4