import logging import os.path import gradio as gr import run_utils def run_wrapper(protein_file, ligand_file, *args, **kwargs) -> str: return run_utils.run_cli_command( protein_file.name, ligand_file.name, *args, **kwargs ) def run(): iface = gr.Interface( fn=run_wrapper, inputs=[ gr.File(label="Protein PDB", file_types=[".pdb"]), gr.File(label="Ligand SDF", file_types=[".sdf"]), gr.Number( label="Samples Per Complex", value=1, minimum=1, maximum=100, precision=0, ), gr.Checkbox(label="Keep Local Structures", value=True), gr.Checkbox(label="Save Visualisation", value=True), ], outputs=gr.File(label="Result"), ) iface.launch(server_name="0.0.0.0", server_port=7860, share=False) if __name__ == "__main__": run_utils.set_env_variables() run_utils.configure_logging() run()