Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
|
|
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 |
-
|
792 |
elif isinstance(obj, list):
|
793 |
for item in obj:
|
794 |
-
|
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 |
|