File size: 495 Bytes
1b9fa1d 3e2256f 1b9fa1d b2ffd7d 1b9fa1d 6bd3cad 397001a b2ffd7d 1b9fa1d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import gradio as gr
import cg2all
import os
def runner(in_pdb, model_type):
out_fn = in_pdb.name[:-4] + "-all.pdb"
return out_fn + str(os.path.exists(in_pdb.name))
#print(in_pdb, in_pdb.name, os.path.exists(in_pdb.name))
#cg2all.convert_cg2all(in_pdb.name, out_fn, model_type=model_type)
demo = gr.Interface(fn=runner,
inputs=["file", gr.Radio(["CalphaBasedModel", "ResidueBasedModel", "Martini"])],
outputs=["text"])
demo.launch() |