nickmuchi commited on
Commit
f55cae9
·
1 Parent(s): ae7bc30

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -89,7 +89,7 @@ class ChatWrapper:
89
  try:
90
  history = history or []
91
  # Set OpenAI key
92
-
93
  # Run chain and append input.
94
  output = chain({"question": inp, "chat_history": history})["answer"]
95
  history.append((inp, output))
@@ -111,7 +111,6 @@ with block:
111
  embeddings.change(on_value_change, embeddings)
112
 
113
  vectorstore = load_vectorstore(embeddings.value)
114
- chain = get_chain(vectorstore)
115
 
116
  chatbot = gr.Chatbot()
117
 
 
89
  try:
90
  history = history or []
91
  # Set OpenAI key
92
+ chain = get_chain(vectorstore)
93
  # Run chain and append input.
94
  output = chain({"question": inp, "chat_history": history})["answer"]
95
  history.append((inp, output))
 
111
  embeddings.change(on_value_change, embeddings)
112
 
113
  vectorstore = load_vectorstore(embeddings.value)
 
114
 
115
  chatbot = gr.Chatbot()
116