cg2all / app.py
huhlim's picture
Update app.py
cf9c11c
raw
history blame
407 Bytes
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 gr.File(out_fn)
demo = gr.Interface(fn=runner,
inputs=["file", gr.Radio(["CalphaBasedModel", "ResidueBasedModel", "Martini"])],
outputs=["file"])
demo.launch()