Spaces:
Sleeping
Sleeping
import flask | |
from flask import request, jsonify, send_file | |
import os | |
from dotenv import load_dotenv | |
import globs | |
from flask import render_template | |
from api_logic import api | |
from google_db import save_db | |
from my_sqlite import create_SQL | |
load_dotenv() | |
app = flask.Flask(__name__, template_folder="./") | |
app.config['DEBUG'] = True | |
def index(): | |
return flask.render_template('index.html') | |
def online(): | |
return render_template('online.html') | |
def settings(): | |
return render_template('settings.html') | |
def handle_api(): | |
response = api() | |
return response | |
def handle_save_db(): | |
response = save_db() | |
return response | |
def set_res(): | |
globs.eep_set = 0 | |
return jsonify(value_set="reset") | |
if __name__ == '__main__': | |
app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 7860))) |