Spaces:
Sleeping
Sleeping
gorkemgoknar
commited on
Commit
•
ed55cb9
1
Parent(s):
8d707c1
Update app.py
Browse files
app.py
CHANGED
@@ -212,6 +212,9 @@ def predict(
|
|
212 |
f"Unrecoverable exception caused by language:{DEVICE_ASSERT_LANG} prompt:{DEVICE_ASSERT_PROMPT}"
|
213 |
)
|
214 |
|
|
|
|
|
|
|
215 |
try:
|
216 |
metrics_text = ""
|
217 |
t_latent = time.time()
|
|
|
212 |
f"Unrecoverable exception caused by language:{DEVICE_ASSERT_LANG} prompt:{DEVICE_ASSERT_PROMPT}"
|
213 |
)
|
214 |
|
215 |
+
print("RESTARTING SPACE")
|
216 |
+
# HF Space specific.. This error is unrecoverable need to restart space
|
217 |
+
api.restart_space(repo_id=repo_id)
|
218 |
try:
|
219 |
metrics_text = ""
|
220 |
t_latent = time.time()
|