Skip to content

Commit

Permalink
Update medapp.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Sudhendra committed Oct 17, 2024
1 parent eaa01f5 commit 4114ef2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions medapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,12 @@ def main():
st.subheader("Generated Answer:")
st.write(answer)

# Add the mindmap visualization
st.subheader("Interactive Mindmap")
nodes, edges = build_mindmap(user_query, answer, related_topics)
config = Config(width=750, height=500, directed=True, physics=True, hierarchical=False)
agraph(nodes=nodes, edges=edges, config=config)
# Add the mindmap visualization within an expander
with st.expander("View Interactive Mindmap"):
st.subheader("Interactive Mindmap")
nodes, edges = build_mindmap(user_query, answer, related_topics)
config = Config(width=750, height=500, directed=True, physics=True, hierarchical=False)
agraph(nodes=nodes, edges=edges, config=config)

with st.expander("View Relevant Passages"):
for passage in relevant_passages:
Expand Down

0 comments on commit 4114ef2

Please sign in to comment.