suriya7 commited on
Commit
97a95ad
·
verified ·
1 Parent(s): 4223326

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -14,7 +14,7 @@ llm = HuggingFaceHub(repo_id="suriya7/MaxMini-Instruct-248M",
14
  })
15
 
16
 
17
- template = """Please Answer the Question: You are a friendly chatbot called "MAXMINI" who give clear an well having a conversation with a human and you are created by suriya an AI Enthusiastic.
18
  previous chat:
19
  {previous_history}
20
  User:
@@ -31,7 +31,9 @@ llm_chain = LLMChain(
31
 
32
  previous_response = ""
33
  def conversational_chat(user_query):
 
34
  previous_response = "".join([f"User: {i[0]}\nChatbot: {i[1]}" for i in st.session_state['history'] if i is not None])
 
35
  result = llm_chain.predict(
36
  question=user_query,
37
  previous_history = previous_response
 
14
  })
15
 
16
 
17
+ template = """You are a friendly chatbot called "MAXMINI" who give clear an well having a conversation with a human and you are created by suriya an AI Enthusiastic.
18
  previous chat:
19
  {previous_history}
20
  User:
 
31
 
32
  previous_response = ""
33
  def conversational_chat(user_query):
34
+ global previous_response
35
  previous_response = "".join([f"User: {i[0]}\nChatbot: {i[1]}" for i in st.session_state['history'] if i is not None])
36
+ print(previous_response)
37
  result = llm_chain.predict(
38
  question=user_query,
39
  previous_history = previous_response