import streamlit as st import streamlit.components.v1 as components import pinecone_utils ANSWER_TEMPLATE = """

{title}

Start time: {start}

End time: {end}

{text}

""" components.html( """""", height=150, ) header = """ ## Join in on your favourite conversation Here's a chatGPT style model, that has access to transcripts of all Making Sense episodes. You can either ask it a full question (such as `How did Twitter work with the FBI?`) or just keywords (`saint augustine free will`). """ st.markdown(header) st.text("") st.text("") st.text("") question = st.text_input( "Ask Sam a question!", value="Is solution to the risk of a nuclear war possible even in theory?", ) # query = "How does Sam Harris manage his time?" st.text("") st.text("") st.text("") if len(question): results = pinecone_utils.ask_pinecone(question=question) for result in results: components.html( ANSWER_TEMPLATE.format_map(result), height=220, )