kcarnold commited on
Commit
06e1d4b
Β·
1 Parent(s): cc79a99

Add URL paths for subpages

Browse files
Files changed (1) hide show
  1. app.py +8 -6
app.py CHANGED
@@ -11,6 +11,7 @@ def landing():
11
  st.page_link(highlight_page, label="Highlight locations for possible edits", icon="πŸ–οΈ")
12
  st.page_link(generate_page, label="Generate revisions", icon="πŸ”„")
13
  st.page_link(type_assistant_response_page, label="Type Assistant Response", icon="πŸ”€")
 
14
 
15
  st.markdown("*Note*: These services send data to a remote server for processing. The server logs requests. Don't use sensitive or identifiable information on this page.")
16
 
@@ -408,17 +409,18 @@ const makeElt = (tag, attrs, children) => {
408
  <script>allLogprobs = {json.dumps(logprobs)};
409
 
410
  {show_logprob_js}
411
- showLogprobs(allLogprobs.length - 1);
 
412
  </script>
413
  """
414
  import streamlit.components.v1 as components
415
  return components.html(html_out, height=300, scrolling=True)
416
 
417
- rewrite_page = st.Page(rewrite_with_predictions, title="Rewrite with predictions", icon="πŸ“")
418
- highlight_page = st.Page(highlight_edits, title="Highlight locations for possible edits", icon="πŸ–οΈ")
419
- generate_page = st.Page(generate_revisions, title="Generate revisions", icon="πŸ”„")
420
- type_assistant_response_page = st.Page(type_assistant_response, title="Type Assistant Response", icon="πŸ”€")
421
- show_internals_page = st.Page(show_internals, title="Show Internals", icon="πŸ”§")
422
 
423
  # Manually specify the sidebar
424
  page = st.navigation([
 
11
  st.page_link(highlight_page, label="Highlight locations for possible edits", icon="πŸ–οΈ")
12
  st.page_link(generate_page, label="Generate revisions", icon="πŸ”„")
13
  st.page_link(type_assistant_response_page, label="Type Assistant Response", icon="πŸ”€")
14
+ st.page_link(show_internals_page, label="Show Internals", icon="πŸ”§")
15
 
16
  st.markdown("*Note*: These services send data to a remote server for processing. The server logs requests. Don't use sensitive or identifiable information on this page.")
17
 
 
409
  <script>allLogprobs = {json.dumps(logprobs)};
410
 
411
  {show_logprob_js}
412
+
413
+ //showLogprobs(allLogprobs.length - 1);
414
  </script>
415
  """
416
  import streamlit.components.v1 as components
417
  return components.html(html_out, height=300, scrolling=True)
418
 
419
+ rewrite_page = st.Page(rewrite_with_predictions, title="Rewrite with predictions", icon="πŸ“", url_path="rewrite")
420
+ highlight_page = st.Page(highlight_edits, title="Highlight locations for possible edits", icon="πŸ–οΈ", url_path="highlights")
421
+ generate_page = st.Page(generate_revisions, title="Generate revisions", icon="πŸ”„", url_path="generate")
422
+ type_assistant_response_page = st.Page(type_assistant_response, title="Type Assistant Response", icon="πŸ”€", url_path="type_assistant_response")
423
+ show_internals_page = st.Page(show_internals, title="Show Internals", icon="πŸ”§", url_path="internals")
424
 
425
  # Manually specify the sidebar
426
  page = st.navigation([