role extracion and sop generation added

This commit is contained in:
2024-08-31 01:29:39 +00:00
parent ccb0db21d6
commit 1f02a30a16
15 changed files with 734 additions and 11 deletions
+21
View File
@@ -0,0 +1,21 @@
import os
from flask import Flask
from src.api.routes.sops import sops_bp
def create_app():
app = Flask(__name__)
# Register the blueprint with the desired prefix
app.register_blueprint(sops_bp, url_prefix='/api/v1/sop')
# Set up the upload folder configuration inside the src directory
UPLOAD_FOLDER = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../uploads')
UPLOAD_FOLDER = os.path.abspath(UPLOAD_FOLDER)
# Make sure the upload folder exists
os.makedirs(UPLOAD_FOLDER, exist_ok=True)
# Assign the upload folder path to Flask config
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
return app