Illia56 commited on
Commit
258da0e
1 Parent(s): 152ba24

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -170,7 +170,10 @@ if prompt := textinput:
170
  st.chat_message("human",avatar = "🧑‍💻").markdown(prompt)
171
  st.session_state.messages.append({"role": "human", "content": prompt})
172
  with st.status("Requesting Client..."):
173
- response = st.session_state.qa.run(prompt)
 
 
 
174
  with st.chat_message("assistant", avatar='🦙'):
175
  st.markdown(response)
176
  # Add assistant response to chat history
 
170
  st.chat_message("human",avatar = "🧑‍💻").markdown(prompt)
171
  st.session_state.messages.append({"role": "human", "content": prompt})
172
  with st.status("Requesting Client..."):
173
+ video_title, _ = get_video_title(st.session_state.youtube_url)
174
+ timestamp = "00:00" # You can modify this to get the actual timestamp if needed
175
+ additional_context = f"Given the context about a video titled '{video_title}' available at '{st.session_state.youtube_url}' (starting from timestamp '{timestamp}')."
176
+ response = st.session_state.qa.run( prompt+ " " + additional_context)
177
  with st.chat_message("assistant", avatar='🦙'):
178
  st.markdown(response)
179
  # Add assistant response to chat history