qqubb commited on
Commit
ffb48a2
·
1 Parent(s): 568e135

fix to not sort keys when dumping yaml

Browse files
__pycache__/compliance_analysis.cpython-310.pyc CHANGED
Binary files a/__pycache__/compliance_analysis.cpython-310.pyc and b/__pycache__/compliance_analysis.cpython-310.pyc differ
 
__pycache__/utils.cpython-310.pyc CHANGED
Binary files a/__pycache__/utils.cpython-310.pyc and b/__pycache__/utils.cpython-310.pyc differ
 
app.py CHANGED
@@ -183,12 +183,9 @@ if uploaded_files:
183
  if 'verbose' in details and 'value' in details:
184
  st.subheader(key.replace('_', ' ').title()) # section header
185
  # details['value'] = st.checkbox(details['verbose'], value=details['value'])
186
- # Determine the type of input based on the type of 'value'
187
  if isinstance(details['value'], str):
188
- # If the value is a string, use a text input box
189
  details['value'] = st.text_input(details['verbose'], value=details['value'])
190
  elif isinstance(details['value'], bool):
191
- # If the value is a boolean, use a checkbox
192
  details['value'] = st.checkbox(details['verbose'], value=details['value'])
193
  if 'verbose' not in details and 'value' not in details:
194
  st.subheader(key.replace('_', ' ').title()) # section header
@@ -199,7 +196,7 @@ if uploaded_files:
199
  st.divider()
200
  st.write("Updated Data:", data)
201
 
202
- yaml_data = yaml.dump(data)
203
 
204
  st.download_button(
205
  label=f"Download Updated Data as YAML{card[0]}",
 
183
  if 'verbose' in details and 'value' in details:
184
  st.subheader(key.replace('_', ' ').title()) # section header
185
  # details['value'] = st.checkbox(details['verbose'], value=details['value'])
 
186
  if isinstance(details['value'], str):
 
187
  details['value'] = st.text_input(details['verbose'], value=details['value'])
188
  elif isinstance(details['value'], bool):
 
189
  details['value'] = st.checkbox(details['verbose'], value=details['value'])
190
  if 'verbose' not in details and 'value' not in details:
191
  st.subheader(key.replace('_', ' ').title()) # section header
 
196
  st.divider()
197
  st.write("Updated Data:", data)
198
 
199
+ yaml_data = yaml.dump(data, sort_keys=False)
200
 
201
  st.download_button(
202
  label=f"Download Updated Data as YAML{card[0]}",