awacke1 commited on
Commit
fe861fb
β€’
1 Parent(s): 40b8c5e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -781,17 +781,19 @@ def main():
781
  if st.button("πŸ€– Run AI", key=f'run_with_ai_button_{idx}'):
782
 
783
 
784
- # Experiment to get content field πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–
 
 
785
  total_docs = len(documents)
786
  doc = documents[st.session_state.current_index]
787
  values_with_space = []
788
  def extract_values2(obj):
789
  if isinstance(obj, dict):
790
  for k, v in obj.items():
791
- extract_values(v)
792
  elif isinstance(obj, list):
793
  for item in obj:
794
- extract_values(item)
795
  elif isinstance(obj, str):
796
  if ' ' in obj:
797
  values_with_space.append(obj)
@@ -803,9 +805,10 @@ def main():
803
 
804
  #content = json.dumps(doc, indent=2)
805
  #st.markdown(f"```json\n{content}\n```")
 
 
 
806
 
807
-
808
- # Experiment to get content field πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–
809
 
810
  #search_glossary(json.dumps(editable_doc, indent=2))
811
 
 
781
  if st.button("πŸ€– Run AI", key=f'run_with_ai_button_{idx}'):
782
 
783
 
784
+
785
+
786
+ # Experiment to get content fields πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–
787
  total_docs = len(documents)
788
  doc = documents[st.session_state.current_index]
789
  values_with_space = []
790
  def extract_values2(obj):
791
  if isinstance(obj, dict):
792
  for k, v in obj.items():
793
+ extract_values2(v)
794
  elif isinstance(obj, list):
795
  for item in obj:
796
+ extract_values2(item)
797
  elif isinstance(obj, str):
798
  if ' ' in obj:
799
  values_with_space.append(obj)
 
805
 
806
  #content = json.dumps(doc, indent=2)
807
  #st.markdown(f"```json\n{content}\n```")
808
+ # Experiment to get content fields πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–πŸ€–
809
+
810
+
811
 
 
 
812
 
813
  #search_glossary(json.dumps(editable_doc, indent=2))
814