Spaces:
Sleeping
Sleeping
Commit ·
91cad3f
1
Parent(s): 83923fc
added instance
Browse files- app.py +4 -3
- instance/yourdb.sqlite3 +0 -0
app.py
CHANGED
|
@@ -7,7 +7,7 @@ import yaml
|
|
| 7 |
|
| 8 |
|
| 9 |
app = Flask(__name__)
|
| 10 |
-
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///yourdb.sqlite3'
|
| 11 |
app.config['SECRET_KEY'] = 'your_secret_key'
|
| 12 |
db.init_app(app)
|
| 13 |
app.register_blueprint(main)
|
|
@@ -29,8 +29,9 @@ genai.configure(api_key=GEMINI_API_KEY)
|
|
| 29 |
|
| 30 |
app.llm = genai.GenerativeModel('gemini-2.5-flash')
|
| 31 |
|
| 32 |
-
|
| 33 |
-
|
|
|
|
| 34 |
|
| 35 |
# if __name__ == "__main__":
|
| 36 |
# app.run(debug=True)
|
|
|
|
| 7 |
|
| 8 |
|
| 9 |
app = Flask(__name__)
|
| 10 |
+
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///yourdb.sqlite3?mode=ro'
|
| 11 |
app.config['SECRET_KEY'] = 'your_secret_key'
|
| 12 |
db.init_app(app)
|
| 13 |
app.register_blueprint(main)
|
|
|
|
| 29 |
|
| 30 |
app.llm = genai.GenerativeModel('gemini-2.5-flash')
|
| 31 |
|
| 32 |
+
# For Hugging Face Spaces: Do NOT create DB at runtime
|
| 33 |
+
# with app.app_context():
|
| 34 |
+
# db.create_all()
|
| 35 |
|
| 36 |
# if __name__ == "__main__":
|
| 37 |
# app.run(debug=True)
|
instance/yourdb.sqlite3
ADDED
|
Binary file (12.3 kB). View file
|
|
|