VTechAI commited on
Commit
597eda7
1 Parent(s): f54cab2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import json
2
- import os
3
  import gradio as gr
4
  from numpy.linalg import norm
5
  from gradio_client import Client
@@ -7,5 +7,11 @@ from gradio_client import Client
7
  token = os.environ['token']
8
 
9
  if __name__ == "__main__":
10
- demo = gr.load("VTechAI/Face_demo", src="spaces", hf_token=token)
 
 
 
 
 
 
11
  demo.launch()
 
1
  import json
2
+ import os, time
3
  import gradio as gr
4
  from numpy.linalg import norm
5
  from gradio_client import Client
 
7
  token = os.environ['token']
8
 
9
  if __name__ == "__main__":
10
+ while True:
11
+ try:
12
+ demo = gr.load("VTechAI/Face_demo", src="spaces", hf_token=token)
13
+ except:
14
+ time.sleep(10)
15
+ else:
16
+ break
17
  demo.launch()