Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,6 +5,7 @@ import keras
|
|
| 5 |
import zipfile
|
| 6 |
import json
|
| 7 |
import os
|
|
|
|
| 8 |
|
| 9 |
# 1. Stand-in function for your model's Lambda layer structure
|
| 10 |
def preprocess_input(x):
|
|
@@ -69,5 +70,9 @@ demo = gr.Interface(
|
|
| 69 |
api_name="predict"
|
| 70 |
)
|
| 71 |
|
| 72 |
-
#
|
| 73 |
-
demo.launch(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
import zipfile
|
| 6 |
import json
|
| 7 |
import os
|
| 8 |
+
import time
|
| 9 |
|
| 10 |
# 1. Stand-in function for your model's Lambda layer structure
|
| 11 |
def preprocess_input(x):
|
|
|
|
| 70 |
api_name="predict"
|
| 71 |
)
|
| 72 |
|
| 73 |
+
# Launch the interface safely with no unexpected keyword arguments
|
| 74 |
+
demo.launch()
|
| 75 |
+
|
| 76 |
+
# Keep the server background process alive indefinitely so the container doesn't exit
|
| 77 |
+
while True:
|
| 78 |
+
time.sleep(3600)
|