Spaces:
Runtime error
Runtime error
AlbertoFH98
commited on
Commit
·
ed3190f
1
Parent(s):
28151ad
Update app.py
Browse files
app.py
CHANGED
@@ -191,13 +191,13 @@ RESPUESTA: """
|
|
191 |
st.markdown(prompt)
|
192 |
st.session_state.messages.append({"role": "user", "content": prompt})
|
193 |
with st.chat_message("assistant"):
|
194 |
-
llm_response = qa_chain(prompt)
|
195 |
llm_response = utils.process_llm_response(llm_response, nlp)
|
196 |
st.markdown(llm_response)
|
197 |
start_time_str_list = []; start_time_seconds_list = []; end_time_seconds_list = []
|
198 |
for response in llm_response.split('\n'):
|
199 |
if re.search(r'(\d{2}:\d{2}:\d{2}(.\d{6})?)', response) != None:
|
200 |
-
start_time_str, start_time_seconds, _, end_time_seconds = utils.add_hyperlink_and_convert_to_seconds(response)
|
201 |
start_time_str_list.append(start_time_str)
|
202 |
start_time_seconds_list.append(start_time_seconds)
|
203 |
end_time_seconds_list.append(end_time_seconds)
|
|
|
191 |
st.markdown(prompt)
|
192 |
st.session_state.messages.append({"role": "user", "content": prompt})
|
193 |
with st.chat_message("assistant"):
|
194 |
+
llm_response, cleaned_prompt = qa_chain(prompt)
|
195 |
llm_response = utils.process_llm_response(llm_response, nlp)
|
196 |
st.markdown(llm_response)
|
197 |
start_time_str_list = []; start_time_seconds_list = []; end_time_seconds_list = []
|
198 |
for response in llm_response.split('\n'):
|
199 |
if re.search(r'(\d{2}:\d{2}:\d{2}(.\d{6})?)', response) != None:
|
200 |
+
start_time_str, start_time_seconds, _, end_time_seconds = utils.add_hyperlink_and_convert_to_seconds(response, cleaned_prompt)
|
201 |
start_time_str_list.append(start_time_str)
|
202 |
start_time_seconds_list.append(start_time_seconds)
|
203 |
end_time_seconds_list.append(end_time_seconds)
|