simonduerr commited on
Commit
abe6512
·
verified ·
1 Parent(s): 5908ec7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -26,6 +26,9 @@ def predict(input_mol, style, view_str, chains):
26
  else:
27
  os.system(f"cellscape cartoon --pdb {input_mol.name} --outline chain --colors {chain_str} --depth flat --back_outline --view view_matrix --save outline_all.svg")
28
  #read content of file
 
 
 
29
  with open("outline_all.svg", "r") as f:
30
  return f.read(), "outline_all.svg"
31
 
 
26
  else:
27
  os.system(f"cellscape cartoon --pdb {input_mol.name} --outline chain --colors {chain_str} --depth flat --back_outline --view view_matrix --save outline_all.svg")
28
  #read content of file
29
+ print(os.stat("outline_all.svg").st_size / (1024 * 1024))
30
+ os.system("inkscape outline_all.svg --batch-process --actions='select-all;path-simplify;export-plain-svg'")
31
+
32
  with open("outline_all.svg", "r") as f:
33
  return f.read(), "outline_all.svg"
34