Yingxu He commited on
Commit
5e69eac
·
verified ·
1 Parent(s): 5ee0c02

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -24,8 +24,13 @@ def respond(
24
  ):
25
  progress(0, desc="Starting")
26
 
27
- while endpoint.status != "running":
 
 
 
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")