Skip to content

Commit

Permalink
Merge pull request #45 from TheDataGuild/feature/itune-ready-production
Browse files Browse the repository at this point in the history
Feature/itune ready production
  • Loading branch information
Quantisan authored Oct 13, 2023
2 parents e5a2edc + 4a1d628 commit 209a623
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
Binary file added itune_strategy.pkl
Binary file not shown.
16 changes: 15 additions & 1 deletion mind_palace/app.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import logging

import extract
import index
import openai
Expand All @@ -9,7 +11,19 @@
openai.api_key = st.secrets.openai_key
xml_dir = "./resources/xmls/dennis-oct-10/"
gpt_model = "gpt-3.5-turbo"
itune = Tune(strategy=MultiArmedBandit())


def is_production_env():
return "app_env" in st.secrets.keys() and st.secrets.app_env == "production"


if not is_production_env():
logging.basicConfig(level=logging.INFO)

itune = Tune(
strategy=MultiArmedBandit(),
only_choose_winning_params=is_production_env(),
)

itune.load()

Expand Down
2 changes: 1 addition & 1 deletion requirements/build.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
itune==0.1.1
itune==0.2.0
pypdf==3.16.0
grobid-tei-xml==0.1.3
nltk==3.8.1
Expand Down

0 comments on commit 209a623

Please sign in to comment.