dhuynh95 commited on
Commit
cd4dd98
1 Parent(s): 7dcba46

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -51,7 +51,7 @@ with gr.Blocks() as demo:
51
 
52
  clear = gr.Button("Clear")
53
 
54
- def respond(openai_api_key, message, chat_history):
55
 
56
  index = load_index_from_storage(storage_context)
57
  query_engine = index.as_query_engine(similarity_top_k=3)
@@ -63,8 +63,8 @@ with gr.Blocks() as demo:
63
  time.sleep(1)
64
  return "", chat_history
65
 
66
- msg.submit(respond, [openai_api_key, msg, chatbot], [msg, chatbot])
67
- btn2.click(respond, [openai_api_key, msg, chatbot], [msg, chatbot])
68
  clear.click(lambda: None, None, chatbot, queue=False)
69
 
70
  if __name__ == "__main__":
 
51
 
52
  clear = gr.Button("Clear")
53
 
54
+ def respond(message, chat_history):
55
 
56
  index = load_index_from_storage(storage_context)
57
  query_engine = index.as_query_engine(similarity_top_k=3)
 
63
  time.sleep(1)
64
  return "", chat_history
65
 
66
+ msg.submit(respond, [msg, chatbot], [msg, chatbot])
67
+ btn2.click(respond, [msg, chatbot], [msg, chatbot])
68
  clear.click(lambda: None, None, chatbot, queue=False)
69
 
70
  if __name__ == "__main__":