Timothyxxx commited on
Commit
4568f13
·
1 Parent(s): 5a13c45

Delete container width on db

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -245,7 +245,7 @@ try:
245
  st.markdown("on")
246
  with col1_5:
247
  if i == len(steps) - 1:
248
- st.metric(label="whole", value="Table", delta = None)
249
  else:
250
  with open("tmp_for_vis/{}_result_step_{}_input.txt".format(stamp, i), "r") as f:
251
  sub_tables_input = json.load(f)
@@ -272,7 +272,8 @@ try:
272
  for idx in range(len(header)):
273
  if header[idx].startswith('col_'):
274
  header[idx] = step
275
- st.dataframe(pd.DataFrame(rows, columns=header))
 
276
  else:
277
  st.markdown(result_in_this_step)
278
  with st.spinner('...'):
@@ -283,7 +284,7 @@ try:
283
  exec_answer = exec_answer[0]
284
  # st.subheader(f'Execution answer')
285
  st.text('')
286
- st.markdown(f"Execution answer: {exec_answer}")
287
  # todo: Remove tmp files
288
  except Exception as e:
289
  traceback.print_exc()
 
245
  st.markdown("on")
246
  with col1_5:
247
  if i == len(steps) - 1:
248
+ st.metric(label="whole", value="Table", delta=None)
249
  else:
250
  with open("tmp_for_vis/{}_result_step_{}_input.txt".format(stamp, i), "r") as f:
251
  sub_tables_input = json.load(f)
 
272
  for idx in range(len(header)):
273
  if header[idx].startswith('col_'):
274
  header[idx] = step
275
+ st.dataframe(pd.DataFrame(rows, columns=header), width=500)
276
+ # hard code here, use use_container_width after the huggingface update their streamlit version
277
  else:
278
  st.markdown(result_in_this_step)
279
  with st.spinner('...'):
 
284
  exec_answer = exec_answer[0]
285
  # st.subheader(f'Execution answer')
286
  st.text('')
287
+ st.markdown(f"**Execution answer:** {exec_answer}")
288
  # todo: Remove tmp files
289
  except Exception as e:
290
  traceback.print_exc()