Create app.py
Browse files
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()
|