cg2all / app.py
huhlim's picture
Create app.py
1b9fa1d
raw
history blame
467 Bytes
import gradio as gr
import cg2all
def runner(in_pdb, model_type):
out_fn = in_pdb.name[:-4] + "-all.pdb"
cg2all.convert_cg2all(in_pdb.name, out_fn, model_type=model_type)
demo = gr.Interface(fn=cg2all.convert_cg2all,
inputs=[gr.File("Upload a coarse-grained PDB file"), gr.Radio(["CalphaBasedModel", "ResidueBasedModel", "Martini"])],
outputs=[gr.File("Download the converted all-atom PDB file")])
demo.launch()