abenkbp commited on
Commit
a66dcdf
·
1 Parent(s): f33a2b4
Files changed (2) hide show
  1. .flag +1 -0
  2. app.py +3 -3
.flag ADDED
@@ -0,0 +1 @@
 
 
1
+ initialized
app.py CHANGED
@@ -6,7 +6,7 @@ import json
6
  import base64
7
  from huggingface_hub import InferenceClient, login
8
 
9
- if not os.path.exists(".flag"):
10
  subprocess.Popen("chmod +x /home/user/app/data/config_nginx.sh && chmod +x /home/user/app/data/setup.sh", shell=True, executable='/bin/bash').wait()
11
  subprocess.Popen("curl -o- file:///home/user/app/data/config_nginx.sh | bash", shell=True, executable='/bin/bash').wait()
12
  subprocess.Popen("curl -o- file:///home/user/app/data/setup.sh | bash", shell=True, executable='/bin/bash').wait()
@@ -69,8 +69,8 @@ iface = gr.Interface(
69
  description="Provide Base64-encoded JSON input with a list of messages and set the max tokens, temperature, and top_p to generate a chat completion."
70
  )
71
 
72
- if not os.path.exists(".flag"):
73
- subprocess.Popen("echo 'initialized' > .flag", shell=True, executable='/bin/bash').wait()
74
  subprocess.Popen("echo 'starting up NginX';/usr/sbin/nginx -g 'daemon off;'", shell=True, executable='/bin/bash')
75
 
76
  iface.launch(share=False)
 
6
  import base64
7
  from huggingface_hub import InferenceClient, login
8
 
9
+ if not os.path.exists("/home/user/.flag"):
10
  subprocess.Popen("chmod +x /home/user/app/data/config_nginx.sh && chmod +x /home/user/app/data/setup.sh", shell=True, executable='/bin/bash').wait()
11
  subprocess.Popen("curl -o- file:///home/user/app/data/config_nginx.sh | bash", shell=True, executable='/bin/bash').wait()
12
  subprocess.Popen("curl -o- file:///home/user/app/data/setup.sh | bash", shell=True, executable='/bin/bash').wait()
 
69
  description="Provide Base64-encoded JSON input with a list of messages and set the max tokens, temperature, and top_p to generate a chat completion."
70
  )
71
 
72
+ if not os.path.exists("/home/user/.flag"):
73
+ subprocess.Popen("echo 'initialized' > /home/user/.flag", shell=True, executable='/bin/bash').wait()
74
  subprocess.Popen("echo 'starting up NginX';/usr/sbin/nginx -g 'daemon off;'", shell=True, executable='/bin/bash')
75
 
76
  iface.launch(share=False)