Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -646,8 +646,8 @@ def main():
|
|
| 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]
|
|
@@ -691,8 +691,8 @@ def main():
|
|
| 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]
|
|
@@ -735,8 +735,8 @@ def main():
|
|
| 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 |
|
|
@@ -792,8 +792,8 @@ def main():
|
|
| 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):
|
|
@@ -830,8 +830,8 @@ def main():
|
|
| 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"):
|
|
@@ -867,10 +867,10 @@ def main():
|
|
| 867 |
|
| 868 |
|
| 869 |
|
| 870 |
-
Label = '# π Data display - Data tells tales that words cannot'
|
| 871 |
st.subheader(f"π Container: {st.session_state.selected_container}")
|
| 872 |
if st.session_state.selected_container:
|
| 873 |
if documents_to_display:
|
|
|
|
| 874 |
st.markdown(Label)
|
| 875 |
df = pd.DataFrame(documents_to_display)
|
| 876 |
st.dataframe(df)
|
|
@@ -936,11 +936,11 @@ def main():
|
|
| 936 |
|
| 937 |
|
| 938 |
|
| 939 |
-
Label = '# π¬ Chat functionality - Every chat is a chance to learn'
|
| 940 |
st.subheader("π¬ Chat with Claude")
|
| 941 |
user_input = st.text_area("Message π¨:", height=100)
|
| 942 |
|
| 943 |
if st.button("Send π¨"):
|
|
|
|
| 944 |
st.markdown(Label)
|
| 945 |
if user_input:
|
| 946 |
response = client.messages.create(
|
|
@@ -1024,8 +1024,8 @@ def main():
|
|
| 1024 |
|
| 1025 |
|
| 1026 |
|
| 1027 |
-
Label = '# πͺ Logout - All good things must come to an end'
|
| 1028 |
if st.session_state.logged_in and st.sidebar.button("πͺ Logout"):
|
|
|
|
| 1029 |
st.markdown(Label)
|
| 1030 |
st.session_state.logged_in = False
|
| 1031 |
st.session_state.selected_records.clear()
|
|
|
|
| 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 |
if selected_view == 'Show as Markdown':
|
| 650 |
+
Label = '# π Markdown view - Mark it down, mark it up'
|
| 651 |
st.markdown(Label)
|
| 652 |
total_docs = len(documents)
|
| 653 |
doc = documents[st.session_state.current_index]
|
|
|
|
| 691 |
|
| 692 |
|
| 693 |
|
|
|
|
| 694 |
elif selected_view == 'Show as Code Editor':
|
| 695 |
+
Label = '# π» Code editor view - Code is poetry, bugs are typos'
|
| 696 |
st.markdown(Label)
|
| 697 |
total_docs = len(documents)
|
| 698 |
doc = documents[st.session_state.current_index]
|
|
|
|
| 735 |
|
| 736 |
|
| 737 |
|
|
|
|
| 738 |
elif selected_view == 'Show as Edit, Save, Run AI':
|
| 739 |
+
Label = '# βοΈ Edit and save view - Edit with wisdom, save with precision'
|
| 740 |
st.markdown(Label)
|
| 741 |
st.markdown("#### Edit the document fields below:")
|
| 742 |
|
|
|
|
| 792 |
|
| 793 |
|
| 794 |
|
|
|
|
| 795 |
elif selected_view == 'Clone Document':
|
| 796 |
+
Label = '# 𧬠Clone functionality - Copy wisely, paste precisely'
|
| 797 |
st.markdown(Label)
|
| 798 |
st.markdown("#### Clone a document:")
|
| 799 |
for idx, doc in enumerate(documents_to_display):
|
|
|
|
| 830 |
|
| 831 |
|
| 832 |
|
|
|
|
| 833 |
elif selected_view == 'New Record':
|
| 834 |
+
Label = '# π New Record view - Every new record is a new beginning'
|
| 835 |
st.markdown(Label)
|
| 836 |
st.markdown("#### Create a new document:")
|
| 837 |
#if st.button("π€ Insert Auto-Generated Record"):
|
|
|
|
| 867 |
|
| 868 |
|
| 869 |
|
|
|
|
| 870 |
st.subheader(f"π Container: {st.session_state.selected_container}")
|
| 871 |
if st.session_state.selected_container:
|
| 872 |
if documents_to_display:
|
| 873 |
+
Label = '# π Data display - Data tells tales that words cannot'
|
| 874 |
st.markdown(Label)
|
| 875 |
df = pd.DataFrame(documents_to_display)
|
| 876 |
st.dataframe(df)
|
|
|
|
| 936 |
|
| 937 |
|
| 938 |
|
|
|
|
| 939 |
st.subheader("π¬ Chat with Claude")
|
| 940 |
user_input = st.text_area("Message π¨:", height=100)
|
| 941 |
|
| 942 |
if st.button("Send π¨"):
|
| 943 |
+
Label = '# π¬ Chat functionality - Every chat is a chance to learn'
|
| 944 |
st.markdown(Label)
|
| 945 |
if user_input:
|
| 946 |
response = client.messages.create(
|
|
|
|
| 1024 |
|
| 1025 |
|
| 1026 |
|
|
|
|
| 1027 |
if st.session_state.logged_in and st.sidebar.button("πͺ Logout"):
|
| 1028 |
+
Label = '# πͺ Logout - All good things must come to an end'
|
| 1029 |
st.markdown(Label)
|
| 1030 |
st.session_state.logged_in = False
|
| 1031 |
st.session_state.selected_records.clear()
|