Vageesh1 commited on
Commit
d3082d7
·
1 Parent(s): e01c0ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -31,12 +31,9 @@ from helper import parse_transcription,hindi_to_english,translate_english_to_hin
31
  def extract_text_from_html(html):
32
  cleanr = re.compile('<.*?>')
33
  cleantext = re.sub(cleanr, '', html)
34
- def conversational_chat(chain,query):
35
- result = chain({"question": query,
36
- "chat_history": st.session_state['history']})
37
- st.session_state['history'].append((query, result["answer"]))
38
-
39
- return result["answer"]
40
 
41
  def save_uploaded_file_as_mp3(uploaded_file, output_file_path):
42
  audio = AudioSegment.from_file(uploaded_file)
 
31
  def extract_text_from_html(html):
32
  cleanr = re.compile('<.*?>')
33
  cleantext = re.sub(cleanr, '', html)
34
+ def conversational_chat(llm_chain,text):
35
+ output = llm_chain.predict(human_input=query)
36
+ return extract_text_from_html(output)
 
 
 
37
 
38
  def save_uploaded_file_as_mp3(uploaded_file, output_file_path):
39
  audio = AudioSegment.from_file(uploaded_file)