t5 commited on
Commit
1b1d058
·
1 Parent(s): 1bdb6d3
Files changed (1) hide show
  1. neo server.py +6 -5
neo server.py CHANGED
@@ -33,9 +33,10 @@ app = Flask(__name__)
33
  app.t0=time.perf_counter()
34
  handle_post="/handle_post"
35
  if host=="face":
36
- myd="/home/user/app"
37
  handle_post=os.environ.get("handle_post")
38
  elif not cpa:
 
39
  from pyngrok import conf, ngrok
40
  ## exec("conf.get_default().auth_"+b'\x74\x6F\x6B\x65\x6E'.decode()+" = sign"
41
  port=5000
@@ -55,8 +56,8 @@ def run1(data):
55
  if "te" in fn:
56
  fn2=fn.get("of", fn["fn"])
57
  wfd("c2/"+fn2).w(fn["te"],0,0,0)
58
- pr2(myd+"/"+fn2)
59
- wfd(myd+"/"+fn2).w(fn["te"],0,0,0)
60
  for fn,fil in data.get("limp") or ():
61
  fn2=fn.get("of", fn["fn"])
62
  ## pr2(f"run({fn['fn']} reload={fn['reload']})")
@@ -68,8 +69,8 @@ def handle_post():
68
  try:
69
  if request.is_json and (data:=request.get_json()) and ("limp" in data):
70
  run1(data)
71
- else: return impt("c2/impot.py",reload=0).flap(app, request)
72
- if not "1" in data: return impt("c2/impot.py",reload=0).flap(app, request)
73
  if "1" in data:
74
  e={}
75
  exec(data["1"],globals(),e)
 
33
  app.t0=time.perf_counter()
34
  handle_post="/handle_post"
35
  if host=="face":
36
+ mid="/home/user/app"
37
  handle_post=os.environ.get("handle_post")
38
  elif not cpa:
39
+ mid=("/content/gdrive/MyDrive/w")
40
  from pyngrok import conf, ngrok
41
  ## exec("conf.get_default().auth_"+b'\x74\x6F\x6B\x65\x6E'.decode()+" = sign"
42
  port=5000
 
56
  if "te" in fn:
57
  fn2=fn.get("of", fn["fn"])
58
  wfd("c2/"+fn2).w(fn["te"],0,0,0)
59
+ pr2(mid+"/"+fn2)
60
+ wfd(mid+"/"+fn2).w(fn["te"],0,0,0)
61
  for fn,fil in data.get("limp") or ():
62
  fn2=fn.get("of", fn["fn"])
63
  ## pr2(f"run({fn['fn']} reload={fn['reload']})")
 
69
  try:
70
  if request.is_json and (data:=request.get_json()) and ("limp" in data):
71
  run1(data)
72
+ else: return impt("c2/top/impot.py",reload=0).flap(app, request)
73
+ if not "1" in data: return impt("c2/top/impot.py",reload=0).flap(app, request)
74
  if "1" in data:
75
  e={}
76
  exec(data["1"],globals(),e)