Eitan177 commited on
Commit
8bd3df4
·
1 Parent(s): f2344b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -13
app.py CHANGED
@@ -95,19 +95,22 @@ def dl(valforkey):
95
  # file_name="SBS.pdf",
96
  # mime='application/octet-stream')
97
 
98
-
99
- with open("output/ID83/Suggested_Solution/COSMIC_ID83_Decomposed_Solution/ID83_Decomposition_Plots.pdf", "rb") as pdf_file:
100
- PDFbyte2 = pdf_file.read()
101
- #PDFbyte2=[]
102
- with open("output/ID83/Samples.txt","rb") as txt_file:
103
- Txtbyte2 = txt_file.read()
104
- #Txtbyte2=[]
105
- with open("output/DBS78/Suggested_Solution/COSMIC_DBS78_Decomposed_Solution/DBS78_Decomposition_Plots.pdf", "rb") as pdf_file:
106
- PDFbyte3 = pdf_file.read()
107
- #PDFbyte3 =[]
108
- with open("output/DBS78/Samples.txt","rb") as txt_file:
109
- Txtbyte3 = txt_file.read()
110
- #Txtbyte3=[]
 
 
 
111
  os.system('rm -r output')
112
  os.system('rm -r input')
113
  #os.remove("output/SBS96/Suggested_Solution/COSMIC_SBS96_Decomposed_Solution/SBS96_Decomposition_Plots.pdf")
 
95
  # file_name="SBS.pdf",
96
  # mime='application/octet-stream')
97
 
98
+ if glob.glob('output/ID83/Suggested_Solution/COSMIC_ID83_Decomposed_Solution/ID83_Decomposition_Plots.pdf') != []:
99
+ with open("output/ID83/Suggested_Solution/COSMIC_ID83_Decomposed_Solution/ID83_Decomposition_Plots.pdf", "rb") as pdf_file:
100
+ PDFbyte2 = pdf_file.read()
101
+ with open("output/ID83/Samples.txt","rb") as txt_file:
102
+ Txtbyte2 = txt_file.read()
103
+ else:
104
+ PDFbyte2 = []
105
+ Txtbyte2 = []
106
+ if glob.glob("output/DBS78/Suggested_Solution/COSMIC_DBS78_Decomposed_Solution/DBS78_Decomposition_Plots.pdf") ! = []:
107
+ with open("output/DBS78/Suggested_Solution/COSMIC_DBS78_Decomposed_Solution/DBS78_Decomposition_Plots.pdf", "rb") as pdf_file:
108
+ PDFbyte3 = pdf_file.read()
109
+ with open("output/DBS78/Samples.txt","rb") as txt_file:
110
+ Txtbyte3 = txt_file.read()
111
+ else:
112
+ PDFbyte3 = []
113
+ Txtbyte3=[]
114
  os.system('rm -r output')
115
  os.system('rm -r input')
116
  #os.remove("output/SBS96/Suggested_Solution/COSMIC_SBS96_Decomposed_Solution/SBS96_Decomposition_Plots.pdf")