James MacQuillan commited on
Commit
263d34e
·
1 Parent(s): 700d3fd
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -171,7 +171,7 @@ def search(query):
171
 
172
  return all_results
173
 
174
- def process_query(user_input, history):
175
  yield 'locating vectorstore 🛠️'
176
  docs = vectorstore.similarity_search(user_input, k=5)
177
 
@@ -275,12 +275,12 @@ with gr.Blocks(theme=theme) as demo:
275
  label="Describe Your Investing Style",
276
  placeholder="e.g., Long-term growth with moderate risk tolerance in tech and healthcare stocks"
277
  )
278
- with gr.Column(scale=3, min_width=600):
279
  chat_interface = gr.ChatInterface(
280
- fn=process_query,
281
- chatbot=chatbot,
282
- examples=examples
283
- )
284
 
285
  with gr.Column():
286
  gr.Markdown('''
 
171
 
172
  return all_results
173
 
174
+ def process_query(user_input, history, investing_style):
175
  yield 'locating vectorstore 🛠️'
176
  docs = vectorstore.similarity_search(user_input, k=5)
177
 
 
275
  label="Describe Your Investing Style",
276
  placeholder="e.g., Long-term growth with moderate risk tolerance in tech and healthcare stocks"
277
  )
278
+ with gr.Column():
279
  chat_interface = gr.ChatInterface(
280
+ fn=lambda user_input, history: process_query(user_input, history, investing_style.value),
281
+ chatbot=chatbot,
282
+ examples=examples
283
+ )
284
 
285
  with gr.Column():
286
  gr.Markdown('''