Skip to content

Commit

Permalink
Merge branch 'restore' of https://github.com/intuit/Trapheus into res…
Browse files Browse the repository at this point in the history
…tore
  • Loading branch information
namitad committed Oct 30, 2023
2 parents 4800d9d + 022db9d commit fdd9c59
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions labs/TrapheusAI/trapheusai_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ def handle_dataset_search():
repository_url = data["fullurl"]
df = pd.read_csv(repository_url)
streamlit.data_editor(df)
streamlit.download_button(
"Download as CSV", data = df.to_csv(index=False), file_name=f"{choice}.csv",
mime = "text/csv", on_click = showDownloadMessage)
question = streamlit.chat_input("Ask any question related to the dataset")
if question:

Expand Down Expand Up @@ -98,6 +101,9 @@ def style_page():
"""
streamlit.markdown(style, unsafe_allow_html=True)

def showDownloadMessage():
streamlit.success("Your dataset has been saved")


if __name__ == "__main__":
initialize_page()
Expand Down

0 comments on commit fdd9c59

Please sign in to comment.