-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
28 lines (22 loc) · 877 Bytes
/
app.py
File metadata and controls
28 lines (22 loc) · 877 Bytes
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
from flask import Flask
from flask_cors import CORS
from acne_classification.classification_pred import predict_classification
from acne_classification.classification_train import train_classification
from acne_detection.detection_pred import predict_detection
from acne_detection.detection_train import train_detection
app = Flask(__name__)
CORS(app)
@app.route('/classification_pred', methods=['POST'])
def classification_prediction():
return predict_classification()
@app.route('/classification_train', methods=['POST'])
def classification_training():
return train_classification()
@app.route('/detection_pred', methods=['POST'])
def detection_prediction():
return predict_detection()
@app.route('/detection_train', methods=['POST'])
def detection_training():
return train_detection()
if __name__ == '__main__':
app.run(host='0.0.0.0', port=60017)