Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -119,13 +119,15 @@ if st.button('Extract the property'):
|
|
119 |
st.markdown('## 🖥️ QA Dataset Auto Generation', unsafe_allow_html=True)
|
120 |
st.markdown('### Algorithm Input', unsafe_allow_html=True)
|
121 |
|
122 |
-
st.markdown("###### Example of the
|
123 |
-
|
|
|
|
|
124 |
for line in file:
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
|
130 |
st.markdown('###### Example of the paper collection: ', unsafe_allow_html=True)
|
131 |
with open("./reference_paper.json",'r+', encoding = "utf-8") as f:
|
@@ -156,6 +158,4 @@ with open(file_path, 'r', encoding="utf-8") as file:
|
|
156 |
json_string = json.dumps(json_list, indent=4)
|
157 |
st.text_area("", value=json_string, height=200)
|
158 |
|
159 |
-
st.write("To be updated")
|
160 |
-
|
161 |
|
|
|
119 |
st.markdown('## 🖥️ QA Dataset Auto Generation', unsafe_allow_html=True)
|
120 |
st.markdown('### Algorithm Input', unsafe_allow_html=True)
|
121 |
|
122 |
+
st.markdown("###### Example of the ChemDataExtractor generated database: ", unsafe_allow_html=True)
|
123 |
+
file_path = "./CDE_properties.jsonl"
|
124 |
+
json_list = []
|
125 |
+
with open(file_path, 'r', encoding="utf-8") as file:
|
126 |
for line in file:
|
127 |
+
json_dict = json.loads(line.strip())
|
128 |
+
json_list.append(json_dict)
|
129 |
+
json_string = json.dumps(json_list, indent=4)
|
130 |
+
st.text_area("", value=json_string, height=200)
|
131 |
|
132 |
st.markdown('###### Example of the paper collection: ', unsafe_allow_html=True)
|
133 |
with open("./reference_paper.json",'r+', encoding = "utf-8") as f:
|
|
|
158 |
json_string = json.dumps(json_list, indent=4)
|
159 |
st.text_area("", value=json_string, height=200)
|
160 |
|
|
|
|
|
161 |
|