awacke1 commited on
Commit
391dd95
·
verified ·
1 Parent(s): 2bdc2b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -7
app.py CHANGED
@@ -643,12 +643,12 @@ def main():
643
 
644
  if documents_to_display:
645
  # 🎨 View options - "Different strokes for different folks"
646
- view_options = ['Show as Markdown', 'Show as Code Editor',
647
- 'Show as Edit, Save, Run AI', 'Clone Document', 'New Record']
648
  selected_view = st.sidebar.selectbox("Select Viewer/Editor", view_options, index=2)
649
 
650
- # 📄 Markdown view - "Mark it down, mark it up"
651
  if selected_view == 'Show as Markdown':
 
652
  total_docs = len(documents)
653
  doc = documents[st.session_state.current_index]
654
  st.markdown(f"#### Document ID: {doc.get('id', '')}")
@@ -691,8 +691,9 @@ def main():
691
 
692
 
693
 
694
- # 💻 Code editor view - "Code is poetry, bugs are typos"
695
  elif selected_view == 'Show as Code Editor':
 
696
  total_docs = len(documents)
697
  doc = documents[st.session_state.current_index]
698
  st.markdown(f"#### Document ID: {doc.get('id', '')}")
@@ -734,8 +735,9 @@ def main():
734
 
735
 
736
 
737
- # ✏️ Edit and save view - "Edit with wisdom, save with precision"
738
  elif selected_view == 'Show as Edit, Save, Run AI':
 
739
  st.markdown("#### Edit the document fields below:")
740
 
741
  num_cols = len(documents_to_display)
@@ -790,8 +792,9 @@ def main():
790
 
791
 
792
 
793
- # 🧬 Clone functionality - "Copy wisely, paste precisely"
794
  elif selected_view == 'Clone Document':
 
795
  st.markdown("#### Clone a document:")
796
  for idx, doc in enumerate(documents_to_display):
797
  st.markdown(f"##### Document ID: {doc.get('id', '')}")
@@ -827,8 +830,9 @@ def main():
827
 
828
 
829
 
830
- # 🆕 New Record view - "Every new record is a new beginning"
831
  elif selected_view == 'New Record':
 
832
  st.markdown("#### Create a new document:")
833
  #if st.button("🤖 Insert Auto-Generated Record"):
834
  success, message = save_or_clone_to_cosmos_db(container,
 
643
 
644
  if documents_to_display:
645
  # 🎨 View options - "Different strokes for different folks"
646
+ view_options = ['Show as Markdown', 'Show as Code Editor', 'Show as Edit, Save, Run AI', 'Clone Document', 'New Record']
 
647
  selected_view = st.sidebar.selectbox("Select Viewer/Editor", view_options, index=2)
648
 
649
+ Label = '# 📄 Markdown view - "Mark it down, mark it up'
650
  if selected_view == 'Show as Markdown':
651
+ st.markdown(Label)
652
  total_docs = len(documents)
653
  doc = documents[st.session_state.current_index]
654
  st.markdown(f"#### Document ID: {doc.get('id', '')}")
 
691
 
692
 
693
 
694
+ Label = '# 💻 Code editor view - "Code is poetry, bugs are typos'
695
  elif selected_view == 'Show as Code Editor':
696
+ st.markdown(Label)
697
  total_docs = len(documents)
698
  doc = documents[st.session_state.current_index]
699
  st.markdown(f"#### Document ID: {doc.get('id', '')}")
 
735
 
736
 
737
 
738
+ Label = '# ✏️ Edit and save view - "Edit with wisdom, save with precision"'
739
  elif selected_view == 'Show as Edit, Save, Run AI':
740
+ st.markdown(Label)
741
  st.markdown("#### Edit the document fields below:")
742
 
743
  num_cols = len(documents_to_display)
 
792
 
793
 
794
 
795
+ Label = '# 🧬 Clone functionality - "Copy wisely, paste precisely"'
796
  elif selected_view == 'Clone Document':
797
+ st.markdown(Label)
798
  st.markdown("#### Clone a document:")
799
  for idx, doc in enumerate(documents_to_display):
800
  st.markdown(f"##### Document ID: {doc.get('id', '')}")
 
830
 
831
 
832
 
833
+ Label = '# 🆕 New Record view - "Every new record is a new beginning"'
834
  elif selected_view == 'New Record':
835
+ st.markdown(Label)
836
  st.markdown("#### Create a new document:")
837
  #if st.button("🤖 Insert Auto-Generated Record"):
838
  success, message = save_or_clone_to_cosmos_db(container,