bstraehle commited on
Commit
2ef2fef
·
1 Parent(s): 55d6fa7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -34,6 +34,10 @@ config = {
34
  "temperature": 0,
35
  }
36
 
 
 
 
 
37
  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
38
  "🧠 Thanks for using the app - Bernd" at the end of the answer. """
39
 
@@ -136,11 +140,6 @@ def invoke(openai_api_key, rag_option, prompt):
136
  completion = llm_chain(llm, prompt)
137
  except Exception as e:
138
  raise gr.Error(e)
139
- wandb.login(key = wandb_api_key)
140
- wandb.config[model] = model
141
- wandb.config[temperature] = temperature
142
- wandb.config[rag_option] = rag_option
143
- wandb.init(project = "openai-llm-rag")
144
  wandb.log({"prompt": prompt, "completion": completion})
145
  return completion
146
 
 
34
  "temperature": 0,
35
  }
36
 
37
+ wandb.login(key = wandb_api_key)
38
+ wandb.init(project = "openai-llm-rag", config = config)
39
+ config = wand.config
40
+
41
  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
42
  "🧠 Thanks for using the app - Bernd" at the end of the answer. """
43
 
 
140
  completion = llm_chain(llm, prompt)
141
  except Exception as e:
142
  raise gr.Error(e)
 
 
 
 
 
143
  wandb.log({"prompt": prompt, "completion": completion})
144
  return completion
145