Yingxu He
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -24,8 +24,13 @@ def respond(
|
|
24 |
):
|
25 |
progress(0, desc="Starting")
|
26 |
|
27 |
-
|
|
|
|
|
|
|
28 |
progress(0.25, desc="Waking up model")
|
|
|
|
|
29 |
time.sleep(1)
|
30 |
|
31 |
progress(0.5, desc="Generating")
|
|
|
24 |
):
|
25 |
progress(0, desc="Starting")
|
26 |
|
27 |
+
if endpoint.status != "running":
|
28 |
+
endpoint.client.post({
|
29 |
+
"inputs": "wake up!"
|
30 |
+
})
|
31 |
progress(0.25, desc="Waking up model")
|
32 |
+
|
33 |
+
while endpoint.status != "running":
|
34 |
time.sleep(1)
|
35 |
|
36 |
progress(0.5, desc="Generating")
|