georad commited on
Commit
7ce2192
Β·
verified Β·
1 Parent(s): beba653

Update pages/type_text.py

Browse files
Files changed (1) hide show
  1. pages/type_text.py +7 -5
pages/type_text.py CHANGED
@@ -186,8 +186,8 @@ if INTdesc_input is not None and st.button(":blue[Map to SBS codes]", key="run_s
186
  dfALL = pd.concat([dfALL, pd.DataFrame([dictA])], ignore_index=True)
187
 
188
  st.dataframe(data=dfALL, hide_index=True)
189
- st.markdown('<div id="bottom"></div>', unsafe_allow_html=True)
190
- components.html(scroll_script, height=0, width=0)
191
 
192
  display_format = "ask REASONING MODEL: Which, if any, of the following SBS descriptions corresponds best to " + INTdesc_input +"? "
193
  #st.write(display_format)
@@ -211,8 +211,8 @@ if INTdesc_input is not None and st.button(":blue[Map to SBS codes]", key="run_s
211
  max_new_tokens=256,
212
  )
213
  st.write(outputs[0]["generated_text"][-1]["content"])
214
- st.markdown('<div id="bottom"></div>', unsafe_allow_html=True)
215
- components.html(scroll_script, height=0, width=0)
216
 
217
  bs, b1, b2, b3, bLast = st.columns([0.75, 1.5, 1.5, 1.5, 0.75])
218
  with b1:
@@ -223,4 +223,6 @@ if INTdesc_input is not None and st.button(":blue[Map to SBS codes]", key="run_s
223
  textbutton = st.download_button(label="πŸ“₯ Download .txt", data=convert_df(dfALL), file_name= "results.text", mime='text/plain', key='text_b')
224
  with b3:
225
  #jsonbutton = download_button(results, "results.json", "πŸ“₯ Download .json")
226
- jsonbutton = st.download_button(label="πŸ“₯ Download .json", data=convert_json(dfALL), file_name= "results.json", mime='application/json', key='json_b')
 
 
 
186
  dfALL = pd.concat([dfALL, pd.DataFrame([dictA])], ignore_index=True)
187
 
188
  st.dataframe(data=dfALL, hide_index=True)
189
+ #st.markdown('<div id="bottom"></div>', unsafe_allow_html=True)
190
+ #components.html(scroll_script, height=0, width=0)
191
 
192
  display_format = "ask REASONING MODEL: Which, if any, of the following SBS descriptions corresponds best to " + INTdesc_input +"? "
193
  #st.write(display_format)
 
211
  max_new_tokens=256,
212
  )
213
  st.write(outputs[0]["generated_text"][-1]["content"])
214
+ #st.markdown('<div id="bottom"></div>', unsafe_allow_html=True)
215
+ #components.html(scroll_script, height=0, width=0)
216
 
217
  bs, b1, b2, b3, bLast = st.columns([0.75, 1.5, 1.5, 1.5, 0.75])
218
  with b1:
 
223
  textbutton = st.download_button(label="πŸ“₯ Download .txt", data=convert_df(dfALL), file_name= "results.text", mime='text/plain', key='text_b')
224
  with b3:
225
  #jsonbutton = download_button(results, "results.json", "πŸ“₯ Download .json")
226
+ jsonbutton = st.download_button(label="πŸ“₯ Download .json", data=convert_json(dfALL), file_name= "results.json", mime='application/json', key='json_b')
227
+ st.markdown('<div id="bottom"></div>', unsafe_allow_html=True)
228
+ components.html(scroll_script, height=0, width=0)