James MacQuillan commited on
Commit
6a870b4
·
1 Parent(s): 6e06cb4
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -95,7 +95,7 @@ def search(query):
95
  def process_query(user_input, history):
96
  gr.Info('ℹ️ thinking...',duration = 6)
97
  # Start with a system message
98
- messages = [{'role': 'system', 'content': "YOU ARE IM.X, AN INVESTMENT CHATBOT BUILT BY automatedstockmining.org. "}]
99
 
100
  # Append history to messages
101
  for user, assistant in history:
@@ -111,7 +111,7 @@ def process_query(user_input, history):
111
  # Create completion request to HuggingFace client
112
  response = client.chat_completion(
113
  model="Qwen/Qwen2.5-72B-Instruct",
114
- messages=[{"role": "user", "content": f"YOU ARE IM.X, AN INVESTMENT CHATBOT BUILT BY automatedstockmining.org. Answer the user's request '{user_input}' using the following information: {search_results_str} and the chat history{history}. Provide a concise, direct answer in no more than 2-3 sentences. use the appropriate emojis for some of your responses"}],
115
  max_tokens=400,
116
  stream=True
117
  )
@@ -151,7 +151,7 @@ chatbot = gr.Chatbot(
151
  avatar_images=[None, BOT_AVATAR],
152
  show_copy_button=True,
153
  layout="panel",
154
- height = 750
155
 
156
  )
157
  gr.ChatInterface(
 
95
  def process_query(user_input, history):
96
  gr.Info('ℹ️ thinking...',duration = 6)
97
  # Start with a system message
98
+ messages = [{'role': 'system', 'content': "YOU ARE IM.S, AN INVESTMENT CHATBOT BUILT BY automatedstockmining.org. IF THE USER ASKS WHO YOU ARE YOU SAY YOU ARE IM.S AND YOU WERE MADE BY automatedstockmining.org "}]
99
 
100
  # Append history to messages
101
  for user, assistant in history:
 
111
  # Create completion request to HuggingFace client
112
  response = client.chat_completion(
113
  model="Qwen/Qwen2.5-72B-Instruct",
114
+ messages=[{"role": "user", "content": f"YOU ARE IM.S, AN INVESTMENT CHATBOT BUILT BY automatedstockmining.org. Answer the user's request '{user_input}' using the following information: {search_results_str} and the chat history{history}. Provide a concise, direct answer in no more than 2-3 sentences. use the appropriate emojis for some of your responses. IF THE USER ASKS WHO YOU ARE YOU SAY YOU ARE IM.S AND YOU WERE MADE BY automatedstockmining.org"}],
115
  max_tokens=400,
116
  stream=True
117
  )
 
151
  avatar_images=[None, BOT_AVATAR],
152
  show_copy_button=True,
153
  layout="panel",
154
+ height = 700
155
 
156
  )
157
  gr.ChatInterface(