suriya7 commited on
Commit
82c1ced
·
verified ·
1 Parent(s): 83e1ac9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -29,17 +29,17 @@ Previous Conversations:
29
  Document Content Provided:
30
  {provided_docs}
31
 
32
- Extracted URL Text:
33
  {extracted_text}
34
 
35
- NOTE: If the human asks Question about the url or Given url , please use the information from the 'Extracted URL Text' to provide detailed answers.
36
 
37
  Human: {human_input}
38
  Chatbot: """
39
 
40
 
41
  prompt = PromptTemplate(
42
- input_variables=["chat_history", "human_input", "provided_docs", "extracted_text"],
43
  template=template
44
  )
45
 
@@ -54,7 +54,7 @@ llm_chain = LLMChain(
54
  previous_response = ""
55
  provided_docs = ""
56
  def conversational_chat(query):
57
- global previous_response, provided_docs, extracted_text
58
  previous_response = "".join([f"Human: {i[0]}\nChatbot: {i[1]}" for i in st.session_state['history'] if i is not None])
59
  provided_docs = "".join([doc for doc in st.session_state["docs"] if doc is not None])
60
  extracted_text = "".join([text for text in st.session_state["extracted_text"] if text is not None])
 
29
  Document Content Provided:
30
  {provided_docs}
31
 
32
+ URL Text:
33
  {extracted_text}
34
 
35
+ NOTE: If the human asks Question about the url or Given url related question,please use the information from the 'URL Text' to provide detailed answers.
36
 
37
  Human: {human_input}
38
  Chatbot: """
39
 
40
 
41
  prompt = PromptTemplate(
42
+ input_variables=["chat_history", "provided_docs", "extracted_text", "human_input"],
43
  template=template
44
  )
45
 
 
54
  previous_response = ""
55
  provided_docs = ""
56
  def conversational_chat(query):
57
+ global previous_response, provided_docs
58
  previous_response = "".join([f"Human: {i[0]}\nChatbot: {i[1]}" for i in st.session_state['history'] if i is not None])
59
  provided_docs = "".join([doc for doc in st.session_state["docs"] if doc is not None])
60
  extracted_text = "".join([text for text in st.session_state["extracted_text"] if text is not None])