namish10 commited on
Commit
74632ff
·
verified ·
1 Parent(s): dd67d34

Upload app/__init__.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app/__init__.py +42 -0
app/__init__.py ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ ContextFlow Research - Flask Application Factory
3
+ """
4
+
5
+ from flask import Flask
6
+ from flask_cors import CORS
7
+
8
+
9
+ def create_app():
10
+ """Create and configure the Flask application."""
11
+ app = Flask(__name__)
12
+
13
+ CORS(app)
14
+
15
+ app.config['SECRET_KEY'] = 'contextflow-research-secret-2024'
16
+ app.config['JSON_SORT_KEYS'] = False
17
+
18
+ from app.api.main import api as api_blueprint
19
+ app.register_blueprint(api_blueprint, url_prefix='/api')
20
+
21
+ @app.route('/')
22
+ def index():
23
+ return {
24
+ 'name': 'ContextFlow Research API',
25
+ 'version': '1.0.0',
26
+ 'status': 'running',
27
+ 'endpoints': {
28
+ 'health': '/api/health',
29
+ 'session': '/api/session/*',
30
+ 'predict': '/api/predict/*',
31
+ 'behavior': '/api/behavior/*',
32
+ 'graph': '/api/graph/*',
33
+ 'review': '/api/review/*',
34
+ 'peer': '/api/peer/*',
35
+ 'gesture': '/api/gesture/*'
36
+ }
37
+ }
38
+
39
+ return app
40
+
41
+
42
+ __version__ = "1.0.0"