-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdetocs.py
36 lines (28 loc) · 803 Bytes
/
detocs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
Author: Burak Ulas - github.com/burakulas
2024, Konkoly Observatory, COMU
"""
from flask import Flask, render_template
from utils.utils import input_f, response_f, downl_f, downim_f
app = Flask(__name__)
#app.secret_key = 'tess_od'
@app.route('/')
def home():
return render_template('index.html')
# Render results
@app.route('/results', methods=['GET','POST'])
def results():
result_data = input_f()
return render_template('index.html', result_data=result_data)
# Download images and annotations
@app.route('/index.html')
def index():
return response_f()
@app.route('/downl', methods=['POST'])
def downl():
return downl_f()
@app.route('/download_image', methods=['GET'])
def download_image():
return downim_f()
if __name__ == '__main__':
app.run(debug=True)