Eitan177 commited on
Commit
0bea608
·
1 Parent(s): 250b60b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -9
app.py CHANGED
@@ -36,15 +36,17 @@ def show_pdf(file_path):
36
  st.markdown(pdf_display, unsafe_allow_html=True)
37
 
38
  def showdl_counts(file_to_lookat,to_dl_sbs96,to_dl_sbs1536):
39
- download_link1 = f'<a href="data:application/octet-stream;base64, \
40
- {base64.b64encode(to_dl_sbs96[j]).decode()}" download=" \
41
- {file_to_lookat[j].name}96SBS.txt">Download {file_to_lookat[j].name} Single Base Substition (96) table</a>'
42
-
43
- download_link2 = f'<a href="data:application/octet-stream;base64, \
44
- {base64.b64encode(to_dl_sbs1536[j]).decode()}" download=" \
45
- {file_to_lookat[j].name}1536SBS.txt">Download {file_to_lookat[j].name} Single Base Substition (1536) table</a>'
46
- st.markdown(download_link1, unsafe_allow_html=True)
47
- st.markdown(download_link2, unsafe_allow_html=True)
 
 
48
  #@st.cache_data(experimental_allow_widgets=True)
49
  def showdl(file_to_lookat,to_dl_sbs,to_dl_indel,to_dl_dbs,to_dl_sbs_text,to_dl_indel_text,to_dl_dbs_text,to_dl_sbs_summary_text,to_dl_id_summary_text,to_dl_dbs_summary_text):
50
  for j in np.arange(0,len(to_dl_sbs)):
 
36
  st.markdown(pdf_display, unsafe_allow_html=True)
37
 
38
  def showdl_counts(file_to_lookat,to_dl_sbs96,to_dl_sbs1536):
39
+ for j in np.arange(0,len(to_dl_sbs)):
40
+ if to_dl_sbs96[j] != []:
41
+ download_link1 = f'<a href="data:application/octet-stream;base64, \
42
+ {base64.b64encode(to_dl_sbs96[j]).decode()}" download=" \
43
+ {file_to_lookat[j].name}96SBS.txt">Download {file_to_lookat[j].name} Single Base Substition (96) table</a>'
44
+
45
+ download_link2 = f'<a href="data:application/octet-stream;base64, \
46
+ {base64.b64encode(to_dl_sbs1536[j]).decode()}" download=" \
47
+ {file_to_lookat[j].name}1536SBS.txt">Download {file_to_lookat[j].name} Single Base Substition (1536) table</a>'
48
+ st.markdown(download_link1, unsafe_allow_html=True)
49
+ st.markdown(download_link2, unsafe_allow_html=True)
50
  #@st.cache_data(experimental_allow_widgets=True)
51
  def showdl(file_to_lookat,to_dl_sbs,to_dl_indel,to_dl_dbs,to_dl_sbs_text,to_dl_indel_text,to_dl_dbs_text,to_dl_sbs_summary_text,to_dl_id_summary_text,to_dl_dbs_summary_text):
52
  for j in np.arange(0,len(to_dl_sbs)):