diff --git a/mind_palace/app.py b/mind_palace/app.py index 8b91341..2fcc681 100644 --- a/mind_palace/app.py +++ b/mind_palace/app.py @@ -30,10 +30,14 @@ def load_nodes_and_index(xml_dir, model): query_engine = CitationQueryEngine.from_args(index=vector_index, verbose=True) -# TODO: pass in nodes instead of abstracts @st.cache_data(show_spinner="Summarizing papers... just a few more seconds.") def get_welcome_message(abstracts): - return welcome.summarize(gpt_model, abstracts) + return ( + welcome.summarize(gpt_model, abstracts) + + "\n\n" + + "Top keywords: " + + ", ".join(welcome.extract_keywords(gpt_model, abstracts)) + ) if "messages" not in st.session_state.keys(): # Initialize the chat messages history