You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
467 B
Python
21 lines
467 B
Python
from flask import Flask
|
|
from flask_restful import Api
|
|
from flask_cors import CORS
|
|
from app.routes.camera import Camera
|
|
from app.routes.detection import Detection
|
|
|
|
app = Flask(__name__)
|
|
CORS(app)
|
|
api = Api(app)
|
|
|
|
# Add routes
|
|
api.add_resource(Camera, '/api/camera')
|
|
api.add_resource(Detection, '/api/detection')
|
|
|
|
@app.route('/swagger')
|
|
def swagger_ui():
|
|
return app.send_static_file('swagger.yaml')
|
|
|
|
if __name__ == '__main__':
|
|
app.run(host='0.0.0.0', port=5000)
|