Commit
·
b63fa99
1
Parent(s):
a9d4389
fix config
Browse files
app.py
CHANGED
|
@@ -4,10 +4,12 @@ import os
|
|
| 4 |
if __name__ == "__main__":
|
| 5 |
import ivoryos
|
| 6 |
from ivoryos.config import DemoConfig
|
|
|
|
| 7 |
_conf = DemoConfig()
|
| 8 |
-
|
| 9 |
-
_conf.OUTPUT_FOLDER =
|
| 10 |
os.makedirs(_conf.OUTPUT_FOLDER, exist_ok=True)
|
|
|
|
| 11 |
_conf.CSV_FOLDER = os.path.join(_conf.OUTPUT_FOLDER, 'config_csv/')
|
| 12 |
_conf.SCRIPT_FOLDER = os.path.join(_conf.OUTPUT_FOLDER, 'scripts/')
|
| 13 |
_conf.DATA_FOLDER = os.path.join(_conf.OUTPUT_FOLDER, 'results/')
|
|
@@ -15,9 +17,12 @@ if __name__ == "__main__":
|
|
| 15 |
_conf.LLM_OUTPUT = os.path.join(_conf.OUTPUT_FOLDER, 'llm_output/')
|
| 16 |
_conf.DECK_HISTORY = os.path.join(_conf.OUTPUT_FOLDER, 'deck_history.txt')
|
| 17 |
_conf.SQLALCHEMY_DATABASE_URI = f"sqlite:///{os.path.join(_conf.OUTPUT_FOLDER, 'ivoryos.db')}"
|
| 18 |
-
|
| 19 |
-
_conf.
|
|
|
|
| 20 |
_conf.SESSION_COOKIE_HTTPONLY = True
|
|
|
|
|
|
|
| 21 |
ivoryos.run(__name__, config=_conf, blueprint_plugins=source_code, port=7860)
|
| 22 |
|
| 23 |
# # USE CASE 2 - start OS using current module and enable LLM with Ollama
|
|
|
|
| 4 |
if __name__ == "__main__":
|
| 5 |
import ivoryos
|
| 6 |
from ivoryos.config import DemoConfig
|
| 7 |
+
|
| 8 |
_conf = DemoConfig()
|
| 9 |
+
|
| 10 |
+
_conf.OUTPUT_FOLDER = '/tmp/ivoryos_data' # Just use absolute path directly
|
| 11 |
os.makedirs(_conf.OUTPUT_FOLDER, exist_ok=True)
|
| 12 |
+
|
| 13 |
_conf.CSV_FOLDER = os.path.join(_conf.OUTPUT_FOLDER, 'config_csv/')
|
| 14 |
_conf.SCRIPT_FOLDER = os.path.join(_conf.OUTPUT_FOLDER, 'scripts/')
|
| 15 |
_conf.DATA_FOLDER = os.path.join(_conf.OUTPUT_FOLDER, 'results/')
|
|
|
|
| 17 |
_conf.LLM_OUTPUT = os.path.join(_conf.OUTPUT_FOLDER, 'llm_output/')
|
| 18 |
_conf.DECK_HISTORY = os.path.join(_conf.OUTPUT_FOLDER, 'deck_history.txt')
|
| 19 |
_conf.SQLALCHEMY_DATABASE_URI = f"sqlite:///{os.path.join(_conf.OUTPUT_FOLDER, 'ivoryos.db')}"
|
| 20 |
+
|
| 21 |
+
_conf.SESSION_COOKIE_SECURE = True
|
| 22 |
+
_conf.SESSION_COOKIE_SAMESITE = "None"
|
| 23 |
_conf.SESSION_COOKIE_HTTPONLY = True
|
| 24 |
+
|
| 25 |
+
_conf.SECRET_KEY = "demo-secret-key" # ✅ MUST HAVE THIS
|
| 26 |
ivoryos.run(__name__, config=_conf, blueprint_plugins=source_code, port=7860)
|
| 27 |
|
| 28 |
# # USE CASE 2 - start OS using current module and enable LLM with Ollama
|