James MacQuillan commited on
Commit
5ede06d
·
1 Parent(s): 263d34e
Files changed (1) hide show
  1. app.py +7 -13
app.py CHANGED
@@ -1,5 +1,3 @@
1
-
2
-
3
  from sentence_transformers import SentenceTransformer
4
  import gradio as gr
5
  import os
@@ -171,7 +169,7 @@ def search(query):
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
 
@@ -270,17 +268,13 @@ theme = gr.themes.Ocean()
270
  with gr.Blocks(theme=theme) as demo:
271
  with gr.Column():
272
  gr.Markdown("## quantineuron.com: IM.analyst - Building the Future of Investing")
273
- with gr.Column():
274
- investing_style = gr.Text(
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('''
 
 
 
1
  from sentence_transformers import SentenceTransformer
2
  import gradio as gr
3
  import os
 
169
 
170
  return all_results
171
 
172
+ def process_query(user_input, history):
173
  yield 'locating vectorstore 🛠️'
174
  docs = vectorstore.similarity_search(user_input, k=5)
175
 
 
268
  with gr.Blocks(theme=theme) as demo:
269
  with gr.Column():
270
  gr.Markdown("## quantineuron.com: IM.analyst - Building the Future of Investing")
271
+
272
+ with gr.Column(scale=3, min_width=600):
 
 
 
 
273
  chat_interface = gr.ChatInterface(
274
+ fn=process_query,
275
+ chatbot=chatbot,
276
+ examples=examples
277
+ )
278
 
279
  with gr.Column():
280
  gr.Markdown('''