DmitrMakeev commited on
Commit
aa7fd2a
1 Parent(s): 30cb684

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -19
app.py CHANGED
@@ -3,34 +3,18 @@ from flask import request, jsonify
3
  import os
4
  from dotenv import load_dotenv
5
  load_dotenv()
6
-
7
  app = flask.Flask(__name__, template_folder="./")
8
  app.config['DEBUG'] = True
9
-
10
-
11
-
12
-
13
  @app.route("/")
14
  def index():
15
  return flask.render_template('index.html')
16
-
17
-
18
-
19
-
20
-
21
-
22
  @app.route("/test")
23
- def index():
24
  return flask.render_template('zapro.html')
25
-
26
-
27
-
28
-
29
  @app.route("/avp", methods=["POST"])
30
  def avp():
31
  incoming = request.get_json()
32
 
33
-
34
  # Получаем входной JSON-объект из параметра "bazis"
35
  datas = incoming["bazis"]
36
 
@@ -51,7 +35,5 @@ def avp():
51
  response = {"bazis_out": datas}
52
 
53
  return jsonify(response)
54
-
55
-
56
  if __name__ == '__main__':
57
  app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 7860)))
 
3
  import os
4
  from dotenv import load_dotenv
5
  load_dotenv()
 
6
  app = flask.Flask(__name__, template_folder="./")
7
  app.config['DEBUG'] = True
 
 
 
 
8
  @app.route("/")
9
  def index():
10
  return flask.render_template('index.html')
 
 
 
 
 
 
11
  @app.route("/test")
12
+ def test():
13
  return flask.render_template('zapro.html')
 
 
 
 
14
  @app.route("/avp", methods=["POST"])
15
  def avp():
16
  incoming = request.get_json()
17
 
 
18
  # Получаем входной JSON-объект из параметра "bazis"
19
  datas = incoming["bazis"]
20
 
 
35
  response = {"bazis_out": datas}
36
 
37
  return jsonify(response)
 
 
38
  if __name__ == '__main__':
39
  app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 7860)))