Spaces:
Sleeping
Sleeping
t5
commited on
Commit
·
9ce23e0
1
Parent(s):
f0980a0
apple
Browse files- Dockerfile +1 -1
- neo server.py +7 -13
Dockerfile
CHANGED
|
@@ -3,7 +3,7 @@ FROM python:3.10
|
|
| 3 |
WORKDIR /code
|
| 4 |
|
| 5 |
ENV tmp=/tmp \
|
| 6 |
-
|
| 7 |
|
| 8 |
COPY ./requirements.txt /code/requirements.txt
|
| 9 |
|
|
|
|
| 3 |
WORKDIR /code
|
| 4 |
|
| 5 |
ENV tmp=/tmp \
|
| 6 |
+
space=face
|
| 7 |
|
| 8 |
COPY ./requirements.txt /code/requirements.txt
|
| 9 |
|
neo server.py
CHANGED
|
@@ -27,7 +27,9 @@ disablelog()
|
|
| 27 |
|
| 28 |
import json
|
| 29 |
app = Flask(__name__)
|
| 30 |
-
|
|
|
|
|
|
|
| 31 |
elif not cpa:
|
| 32 |
from pyngrok import conf, ngrok
|
| 33 |
## exec("conf.get_default().auth_"+b'\x74\x6F\x6B\x65\x6E'.decode()+" = sign"
|
|
@@ -56,7 +58,7 @@ def run1(data):
|
|
| 56 |
if(re.search(r"\.pyw?$",fn2)):
|
| 57 |
#pr2(sys.modules[cfile(fn2)])
|
| 58 |
impt(("./c2/"+fn2),reload=fn['reload'])
|
| 59 |
-
@app.
|
| 60 |
def handle_post():
|
| 61 |
try:
|
| 62 |
if request.is_json and (data:=request.get_json()) and ("limp" in data):
|
|
@@ -71,16 +73,8 @@ def handle_post():
|
|
| 71 |
e2=traceback.format_exc()
|
| 72 |
lit={"e2":e2}
|
| 73 |
return json.dumps(lit)
|
| 74 |
-
@app.get("/
|
| 75 |
def read_root():
|
| 76 |
-
fwfw
|
| 77 |
-
return {"Hello": "World..w"}
|
| 78 |
-
@app.get("/w2")
|
| 79 |
-
def w2():
|
| 80 |
-
return "/w2"
|
| 81 |
-
@app.route("/")
|
| 82 |
-
def root():
|
| 83 |
return {"Hello": "World.."}
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
return {"Hello": "World.."}
|
|
|
|
| 27 |
|
| 28 |
import json
|
| 29 |
app = Flask(__name__)
|
| 30 |
+
handle_post="/handle_post"
|
| 31 |
+
if host=="face":
|
| 32 |
+
handle_post=os.environ.get("handle_post")
|
| 33 |
elif not cpa:
|
| 34 |
from pyngrok import conf, ngrok
|
| 35 |
## exec("conf.get_default().auth_"+b'\x74\x6F\x6B\x65\x6E'.decode()+" = sign"
|
|
|
|
| 58 |
if(re.search(r"\.pyw?$",fn2)):
|
| 59 |
#pr2(sys.modules[cfile(fn2)])
|
| 60 |
impt(("./c2/"+fn2),reload=fn['reload'])
|
| 61 |
+
@app.post(handle_post)
|
| 62 |
def handle_post():
|
| 63 |
try:
|
| 64 |
if request.is_json and (data:=request.get_json()) and ("limp" in data):
|
|
|
|
| 73 |
e2=traceback.format_exc()
|
| 74 |
lit={"e2":e2}
|
| 75 |
return json.dumps(lit)
|
| 76 |
+
@app.get("/")
|
| 77 |
def read_root():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
return {"Hello": "World.."}
|
| 79 |
+
##if 1:
|
| 80 |
+
## app.run()
|
|
|