File size: 613 Bytes
1b9fa1d 3e2256f 1b9fa1d cf9c11c fd29c77 1b9fa1d 6bd3cad 397001a f3a9d45 5dfe5a9 1b9fa1d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import gradio as gr
import cg2all
import os
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)
return out_fn
demo = gr.Interface(fn=runner,
inputs=["file", gr.Radio(["CalphaBasedModel", "ResidueBasedModel", "Martini"])],
outputs=["file"],
examples=[["1ab1_A.calpha.pdb", "CalphaBasedModel"],
["1ab1_A.residue.pdb", "ResidueBasedModel"],
["1ab1_A.martini.pdb", "Martini"]])
demo.launch() |