Skip to content

Commit

Permalink
Add breadcrumb when run was taken from an example
Browse files Browse the repository at this point in the history
  • Loading branch information
nikochiko committed Nov 14, 2023
1 parent 40ff964 commit aa8f334
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions daras_ai_v2/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,20 @@ def render(self):
)

if example_id or run_id:
with st.breadcrumbs(className="mt-5"):
with st.breadcrumbs(className="mt-5", divider="/"):
st.breadcrumb_item(
self.get_recipe_page_title(st.session_state).upper(),
link_to=self.app_url(),
className="text-muted",
style={"background-color": "#A5FFEE"},
)
saved_run = self.get_sr_from_query_params(example_id, run_id, uid)
if saved_run.parent and saved_run.parent.example_id:
st.breadcrumb_item(
self.get_page_title(saved_run.parent.to_dict()),
link_to=self.app_url(
example_id=saved_run.parent.example_id,
),
)
st.write(f"# {self.get_page_title(st.session_state)}")
else:
with st.link(
Expand Down

0 comments on commit aa8f334

Please sign in to comment.