awacke1 commited on
Commit
f468451
·
verified ·
1 Parent(s): dd6f353

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -818,13 +818,11 @@ def main():
818
  # Generate a unique ID
819
  cloned_doc['id'] = generate_unique_id()
820
  cloned_doc['name'] = generate_unique_id()
821
-
822
  cloned_doc_str = st.text_area("Cloned Document Content (in JSON format) - Update name please to make it unique before saving!", value=cloned_doc, height=300)
823
 
824
  st.markdown("#### Edit Cloned Document and Name Your Clone:")
825
  if st.button("💾 Save Cloned Document"):
826
- new_doc = json.loads(cloned_doc_str)
827
- success, message = insert_record(container, new_doc)
828
  if success:
829
  st.success(f"Cloned document saved with id: {new_doc['id']} 🎉")
830
  st.session_state.selected_document_id = new_doc['id']
 
818
  # Generate a unique ID
819
  cloned_doc['id'] = generate_unique_id()
820
  cloned_doc['name'] = generate_unique_id()
 
821
  cloned_doc_str = st.text_area("Cloned Document Content (in JSON format) - Update name please to make it unique before saving!", value=cloned_doc, height=300)
822
 
823
  st.markdown("#### Edit Cloned Document and Name Your Clone:")
824
  if st.button("💾 Save Cloned Document"):
825
+ success, message = insert_record(container, cloned_doc)
 
826
  if success:
827
  st.success(f"Cloned document saved with id: {new_doc['id']} 🎉")
828
  st.session_state.selected_document_id = new_doc['id']