fishytorts commited on
Commit
927dc9c
1 Parent(s): 7ff2d8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -63,8 +63,7 @@ st.subheader('1. We need an OpenAI API key: ')
63
  api_key = st.text_input('',placeholder='Enter your OpenAI API key', type='password', help="You can find your OpenAI API key here: https://platform.openai.com/api-keys. Or if you are provided with one by your organization.")
64
  st.caption('Never share your OpenAI API key to anyone. Note that usage of your OpenAI API key will be billed to your OpenAI account. Keep in mind that an image analysis costs approximately `$0.04`')
65
 
66
- # Initialize the OpenAI client with the API key
67
- client = OpenAI(api_key=api_key)
68
  # Initialize messages object
69
  messages = []
70
 
@@ -78,6 +77,8 @@ uploaded_files = st.file_uploader("", help='Up to five images only.', type=["jpg
78
 
79
 
80
  if api_key:
 
 
81
  # load from disk
82
  docsearch = Chroma(persist_directory="./knowledge_base", embedding_function=OpenAIEmbeddings())
83
 
 
63
  api_key = st.text_input('',placeholder='Enter your OpenAI API key', type='password', help="You can find your OpenAI API key here: https://platform.openai.com/api-keys. Or if you are provided with one by your organization.")
64
  st.caption('Never share your OpenAI API key to anyone. Note that usage of your OpenAI API key will be billed to your OpenAI account. Keep in mind that an image analysis costs approximately `$0.04`')
65
 
66
+
 
67
  # Initialize messages object
68
  messages = []
69
 
 
77
 
78
 
79
  if api_key:
80
+ # Initialize the OpenAI client with the API key
81
+ client = OpenAI(api_key=api_key)
82
  # load from disk
83
  docsearch = Chroma(persist_directory="./knowledge_base", embedding_function=OpenAIEmbeddings())
84