Spaces:
Runtime error
Runtime error
Commit ·
8645bf0
1
Parent(s): 303051b
Update app.py
Browse files1223456789101112131114151617181920212223242520 unmodified lines464748495051import flaskfrom flask import request, jsonify, send_file, render_templatefrom flask import request, jsonify, send_fileimport osimport jsonfrom dotenv import load_dotenv
load_dotenv()
app = flask.Flask(__name__)app.config["DEBUG"] = True
@app.route('/', methods=['GET'])def index(): return render_template('index.html') return ''' <html> <body> <h1>Привет, Мир!</h1> <p>Это моя страница.</p> </body> </html> '''
@app.route("/avp", methods=["POST"])def avp(): try:20 unmodified lines "error": str(e) } return jsonify(error_response), 500
if __name__ == '__main__': app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 7860)))app.py+14-2