Spaces:
Running
Running
Update app.py
Browse files
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(
|
35 |
-
|
36 |
-
|
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)
|