huhlim commited on
Commit
1b9fa1d
1 Parent(s): 054e2db

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import cg2all
3
+
4
+ def runner(in_pdb, model_type):
5
+ out_fn = in_pdb.name[:-4] + "-all.pdb"
6
+ cg2all.convert_cg2all(in_pdb.name, out_fn, model_type=model_type)
7
+
8
+ demo = gr.Interface(fn=cg2all.convert_cg2all,
9
+ inputs=[gr.File("Upload a coarse-grained PDB file"), gr.Radio(["CalphaBasedModel", "ResidueBasedModel", "Martini"])],
10
+ outputs=[gr.File("Download the converted all-atom PDB file")])
11
+ demo.launch()