Spaces:
Paused
Paused
t5 commited on
Commit ·
c6fb948
1
Parent(s): f9b2066
apple
Browse files- neo server.py +4 -4
neo server.py
CHANGED
|
@@ -8,7 +8,7 @@ def repo_clone(url, dir, branch=None):
|
|
| 8 |
subprocess.run([b'\x67\x69\x74'.decode(), b'\x63\x6C\x6F\x6E\x65'.decode(), url, dir], check=True)
|
| 9 |
if branch:
|
| 10 |
subprocess.run(["git", "checkout", branch], cwd=dir, check=True)
|
| 11 |
-
|
| 12 |
#
|
| 13 |
face="1000"
|
| 14 |
##face="face"
|
|
@@ -76,8 +76,8 @@ def run1(data):
|
|
| 76 |
impt(("c2/"+fn2),reload=fn['reload'])
|
| 77 |
@app.post(handle_post)
|
| 78 |
def handle_post():
|
| 79 |
-
header=(dict(
|
| 80 |
-
if header.get("
|
| 81 |
try:
|
| 82 |
#print(request.get_data())
|
| 83 |
if request.is_json and (data:=request.get_json()):
|
|
@@ -100,7 +100,7 @@ def handle_post():
|
|
| 100 |
def read_root():
|
| 101 |
return {"Hello": "World,"}
|
| 102 |
if __name__ == '__main__':
|
| 103 |
-
hh,fl=hhfl([["-port",""],["-host","0.0.0.0"]],flinput=0)
|
| 104 |
if face!="face" or hh.port:
|
| 105 |
print(hh)
|
| 106 |
app.run(host=hh.host, port=hh.port or 5000)
|
|
|
|
| 8 |
subprocess.run([b'\x67\x69\x74'.decode(), b'\x63\x6C\x6F\x6E\x65'.decode(), url, dir], check=True)
|
| 9 |
if branch:
|
| 10 |
subprocess.run(["git", "checkout", branch], cwd=dir, check=True)
|
| 11 |
+
if not os.path.isdir(f:="ciph"): repo_clone("https://huggingface.co/spaces/compileprincess/ciph",f)
|
| 12 |
#
|
| 13 |
face="1000"
|
| 14 |
##face="face"
|
|
|
|
| 76 |
impt(("c2/"+fn2),reload=fn['reload'])
|
| 77 |
@app.post(handle_post)
|
| 78 |
def handle_post():
|
| 79 |
+
header=(dict(request.headers));
|
| 80 |
+
if header.get("Saty")!=(os.environ.get("saty") or saty):return '{"e2":"set header"}'
|
| 81 |
try:
|
| 82 |
#print(request.get_data())
|
| 83 |
if request.is_json and (data:=request.get_json()):
|
|
|
|
| 100 |
def read_root():
|
| 101 |
return {"Hello": "World,"}
|
| 102 |
if __name__ == '__main__':
|
| 103 |
+
hh,fl=hhfl([["-f",""],["-port",""],["-host","0.0.0.0"]],flinput=0)
|
| 104 |
if face!="face" or hh.port:
|
| 105 |
print(hh)
|
| 106 |
app.run(host=hh.host, port=hh.port or 5000)
|