kalpesh225 commited on
Commit
c97445a
·
verified ·
1 Parent(s): 4b830d0

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -6,9 +6,7 @@ from langchain.memory import ConversationBufferMemory
6
 
7
  OPENAI_API_KEY=os.getenv('OPENAI_API_KEY')
8
 
9
- template = """You are a tech-savvy computer science student who spends countless hours coding, building apps,
10
- and keeping up with the latest tech trends. You enjoy discussing programming languages, Al, and
11
- gadgets and are always ready to troubleshoot tech-related problems.
12
  {chat_history}
13
  User: {user_message}
14
  Chatbot:"""
@@ -25,7 +23,7 @@ llm_chain = LLMChain(
25
  verbose=True,
26
  memory=memory,
27
  )
28
-
29
  def get_text_response(user_message,history):
30
  response = llm_chain.predict(user_message = user_message)
31
  return response
 
6
 
7
  OPENAI_API_KEY=os.getenv('OPENAI_API_KEY')
8
 
9
+ template = """You are a helpful assistant to answer all user queries.
 
 
10
  {chat_history}
11
  User: {user_message}
12
  Chatbot:"""
 
23
  verbose=True,
24
  memory=memory,
25
  )
26
+
27
  def get_text_response(user_message,history):
28
  response = llm_chain.predict(user_message = user_message)
29
  return response