James MacQuillan commited on
Commit
c692e62
·
1 Parent(s): 6b19354
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -213,7 +213,7 @@ def process_query(user_input, history):
213
  # Step 3: Generate a response using the search results
214
  response = client.chat_completion(
215
  model="Qwen/Qwen2.5-72B-Instruct",
216
- messages=[{"role": "user", "content": f"Using the search results: {search_results_str} and chat history {history}, this vector database on health checks {retrieved_texts} answer the user's query '{user_input}' in a concise, precise way, using numerical data if available. ONLY GIVE ONE RESPONSE BACK, CONCISE OR DETAILED BASED ON THE USERS INPUT"}],
217
  max_tokens=3000,
218
  stream=True
219
  )
@@ -270,7 +270,11 @@ 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
-
 
 
 
 
274
  with gr.Column(scale=3, min_width=600):
275
  chat_interface = gr.ChatInterface(
276
  fn=process_query,
@@ -286,5 +290,5 @@ with gr.Blocks(theme=theme) as demo:
286
 
287
  **Important Note**: Investing in financial markets carries risk, and it is possible to lose some or all of the invested capital. Always consider seeking advice from a qualified financial advisor.
288
  ''')
289
-
290
  demo.launch()
 
213
  # Step 3: Generate a response using the search results
214
  response = client.chat_completion(
215
  model="Qwen/Qwen2.5-72B-Instruct",
216
+ messages=[{"role": "user", "content": f"Using the search results: {search_results_str} and chat history {history}, this vector database on health checks {retrieved_texts} answer the user's query '{user_input}' in a concise, precise way, using numerical data if available. ONLY GIVE ONE RESPONSE BACK, CONCISE OR DETAILED BASED ON THE USERS INPUT. here is a short description of their investing style, so tailor your responses to it and reference it {investing_style}"}],
217
  max_tokens=3000,
218
  stream=True
219
  )
 
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.Textbox(
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,
 
290
 
291
  **Important Note**: Investing in financial markets carries risk, and it is possible to lose some or all of the invested capital. Always consider seeking advice from a qualified financial advisor.
292
  ''')
293
+
294
  demo.launch()