uyen13 commited on
Commit
da7acf6
β€’
1 Parent(s): 192ee82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -92,14 +92,14 @@ chain = ConversationalRetrievalChain.from_llm(llm=llm, retriever=db.as_retriever
92
  def conversational_chat(query):
93
  query = "ζδΎ›γ•γ‚ŒγŸγƒ‡γƒΌγ‚Ώγ«εŸΊγ₯いて,"+query
94
  result = chain({"question": query, "chat_history": st.session_state['history']})
95
- i = 0
96
- while i < len(result["answer"]):
97
- character = input_string[i]
98
- if is_japanese_character(character):
99
- break
100
- else:
101
- result = chain({"question": query, "chat_history": st.session_state['history']})
102
- i += 1
103
  st.session_state['history'].append((query, result["answer"]))
104
  return result["answer"]
105
 
 
92
  def conversational_chat(query):
93
  query = "ζδΎ›γ•γ‚ŒγŸγƒ‡γƒΌγ‚Ώγ«εŸΊγ₯いて,"+query
94
  result = chain({"question": query, "chat_history": st.session_state['history']})
95
+ # i = 0
96
+ # while i < len(result["answer"]):
97
+ # character = input_string[i]
98
+ # if is_japanese_character(character):
99
+ # break
100
+ # else:
101
+ # result = chain({"question": query, "chat_history": st.session_state['history']})
102
+ # i += 1
103
  st.session_state['history'].append((query, result["answer"]))
104
  return result["answer"]
105