IvoryOS / app.py
ivoryzhang's picture
fix config
714ed48
raw
history blame
1.38 kB
from demo_code_plugin.demo_code import pump, sdl, balance
from demo_code_plugin.plugin import source_code
import os
if __name__ == "__main__":
import ivoryos
from ivoryos.config import DemoConfig
_conf = DemoConfig()
# _conf.SQ
_conf.OUTPUT_FOLDER = os.path.join(os.path.abspath(os.curdir), '/tmp/ivoryos_data')
os.makedirs(_conf.OUTPUT_FOLDER, exist_ok=True)
_conf.CSV_FOLDER = os.path.join(_conf.OUTPUT_FOLDER, 'config_csv/')
_conf.SCRIPT_FOLDER = os.path.join(_conf.OUTPUT_FOLDER, 'scripts/')
_conf.DATA_FOLDER = os.path.join(_conf.OUTPUT_FOLDER, 'results/')
_conf.DUMMY_DECK = os.path.join(_conf.OUTPUT_FOLDER, 'pseudo_deck/')
_conf.LLM_OUTPUT = os.path.join(_conf.OUTPUT_FOLDER, 'llm_output/')
_conf.DECK_HISTORY = os.path.join(_conf.OUTPUT_FOLDER, 'deck_history.txt')
_conf.SQLALCHEMY_DATABASE_URI = f"sqlite:///{os.path.join(_conf.OUTPUT_FOLDER, 'ivoryos.db')}"
# app.config["SESSION_COOKIE_SECURE"] = False # Needed if you're testing over HTTP
# app.config["SESSION_COOKIE_SAMESITE"] = "Lax" # Or "None" if embedding cross-site
# app.config["SESSION_COOKIE_HTTPONLY"] = True
ivoryos.run(__name__, config=_conf, blueprint_plugins=source_code, port=7860)
# # USE CASE 2 - start OS using current module and enable LLM with Ollama
# ivoryos.run(__name__, model="llama3.1", llm_server='localhost')