import evaluate from evaluate.utils import launch_gradio_widget import gradio as gr module = evaluate.load("saicharan2804/molgenevalmetric") # launch_gradio_widget(module) iface = gr.Interface( fn = module.compute, inputs=[ gr.File(label="Generated SMILES"), gr.File(label="Training Data", value=None), ], outputs="text" ) iface.launch() # import pandas as pd # from molgenevalmetric import penalized_logp # import evaluate # df = pd.read_csv('/Users/saicharan/chembl_10000.csv') # ls= df['SMILES'].tolist() # ls_gen = ls[0:500] # ls_train = ls[500:1000] # print('computing') # print(penalized_logp(gen=ls_gen)) # print(SYBAscore(gen=ls_gen)) # print(qed_metric(gen=ls_gen)) # print(logP_metric(gen=ls_gen)) # print(average_sascore(gen=ls_gen)) # print(oracles(gen=ls_gen, train=ls_train)) # met = evaluate.load("saicharan2804/molgenevalmetric") # print(met.compute(gensmi = ls_gen, trainsmi = ls_train))