bstraehle commited on
Commit
167fad7
·
1 Parent(s): ccd8d1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -36,7 +36,7 @@ config = {
36
 
37
  wandb_api_key = os.environ["WANDB_API_KEY"]
38
  wandb.login(key = wandb_api_key)
39
- wandb.init(project = "openai-llm-rag", allow_val_change = True, config = config)
40
  config = wandb.config
41
 
42
  template = """If you don't know the answer, just say that you don't know, don't try to make up an answer. Keep the answer as concise as possible. Always say
@@ -126,6 +126,7 @@ def invoke(openai_api_key, rag_option, prompt):
126
  if (prompt == ""):
127
  raise gr.Error("Prompt is required.")
128
  config.rag_option = rag_option
 
129
  try:
130
  llm = ChatOpenAI(model_name = config.model,
131
  openai_api_key = openai_api_key,
 
36
 
37
  wandb_api_key = os.environ["WANDB_API_KEY"]
38
  wandb.login(key = wandb_api_key)
39
+ wandb.init(project = "openai-llm-rag", config = config)
40
  config = wandb.config
41
 
42
  template = """If you don't know the answer, just say that you don't know, don't try to make up an answer. Keep the answer as concise as possible. Always say
 
126
  if (prompt == ""):
127
  raise gr.Error("Prompt is required.")
128
  config.rag_option = rag_option
129
+ config.update(allow_val_change = True)
130
  try:
131
  llm = ChatOpenAI(model_name = config.model,
132
  openai_api_key = openai_api_key,