CannaTech commited on
Commit
b91fdf2
·
1 Parent(s): 6c45c8d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,12 +1,13 @@
1
  import openai
2
  import gradio as gr
 
3
 
4
- openai.api_key = "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"
5
 
6
  messages = [{"role": "system", "content": "You are an expert in Technical Support and Customer Service that specializes in New Mexico Cannabis Regulatory Compliance and training people how to use software called BioTrack"}]
7
 
8
  def CustomChatGPT(category, user_input):
9
- user_input = "In the context of {category} specifically and using your expert knowledge of cannabis regulations in New Mexico and BioTrack" + user_input
10
  messages.append({"role": "user", "content": user_input})
11
  response = openai.ChatCompletion.create(
12
  model="gpt-3.5-turbo",
@@ -34,3 +35,4 @@ iface = gr.Interface(
34
  iface.launch()
35
 
36
 
 
 
1
  import openai
2
  import gradio as gr
3
+ import os
4
 
5
+ openai.api_key = os.environ["OPENAI_API_KEY"]
6
 
7
  messages = [{"role": "system", "content": "You are an expert in Technical Support and Customer Service that specializes in New Mexico Cannabis Regulatory Compliance and training people how to use software called BioTrack"}]
8
 
9
  def CustomChatGPT(category, user_input):
10
+ user_input = f"In the context of {category} specifically and using your expert knowledge of cannabis regulations in New Mexico and BioTrack" + user_input
11
  messages.append({"role": "user", "content": user_input})
12
  response = openai.ChatCompletion.create(
13
  model="gpt-3.5-turbo",
 
35
  iface.launch()
36
 
37
 
38
+