heisbuba commited on
Commit
6562f42
·
verified ·
1 Parent(s): 464e7e6

Upload 4 files

Browse files
Files changed (4) hide show
  1. README.md +4 -4
  2. app.py +32 -0
  3. requirements.txt +6 -0
  4. start.sh +3 -0
README.md CHANGED
@@ -1,10 +1,10 @@
1
  ---
2
- title: Shigatrade
3
  emoji: 🐠
4
- colorFrom: indigo
5
- colorTo: yellow
6
  sdk: docker
7
  pinned: false
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: Shiga.Trade
3
  emoji: 🐠
4
+ colorFrom: purple
5
+ colorTo: purple
6
  sdk: docker
7
  pinned: false
8
  ---
9
 
10
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
app.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from flask import Flask
3
+ from dotenv import load_dotenv
4
+
5
+ # Initialize environment variables
6
+ load_dotenv()
7
+
8
+ def create_app():
9
+ # Define paths relative to this file
10
+ app = Flask(
11
+ __name__,
12
+ template_folder='src/templates',
13
+ static_folder='src/templates/static',
14
+ static_url_path='/static'
15
+ )
16
+
17
+ app.config['SECRET_KEY'] = os.getenv('SECRET_KEY', 'shiga-dev-2026')
18
+
19
+ # Standardized imports from the src package
20
+ from src.routes.main import main_bp
21
+ from src.routes.auth import auth_bp
22
+
23
+ app.register_blueprint(main_bp)
24
+ app.register_blueprint(auth_bp, url_prefix='/auth')
25
+
26
+ return app
27
+
28
+ app = create_app()
29
+
30
+ if __name__ == "__main__":
31
+ # Binding to port 7860 for HF Spaces
32
+ app.run(host="0.0.0.0", port=7860)
requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ Flask
2
+ gunicorn
3
+ solathon
4
+ supabase
5
+ python-dotenv
6
+ requests
start.sh ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ #!/bin/sh
2
+ # Start Gunicorn, pointing to the 'app' variable in 'app.py'
3
+ exec gunicorn -w 4 -b 0.0.0.0:7860 "app:app"