saicharan2804 commited on
Commit
45b8348
1 Parent(s): b4c02aa

Code change

Browse files
Files changed (2) hide show
  1. app.py +12 -1
  2. my_metric.py +2 -1
app.py CHANGED
@@ -52,4 +52,15 @@ from evaluate.utils import launch_gradio_widget
52
 
53
 
54
  module = evaluate.load("saicharan2804/my_metric")
55
- launch_gradio_widget(module)
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
 
54
  module = evaluate.load("saicharan2804/my_metric")
55
+ # launch_gradio_widget(module)
56
+
57
+ iface = gr.Interface(
58
+ fn = module,
59
+ inputs=[
60
+ gr.File(label="Generated SMILES"),
61
+ gr.File(label="Training Data", value=None),
62
+ ],
63
+ outputs="text"
64
+ )
65
+
66
+ iface.launch()
my_metric.py CHANGED
@@ -72,7 +72,8 @@ class my_metric(evaluate.Metric):
72
  "generated_smiles": datasets.Value("string"),
73
  "train_smiles": datasets.Value("string"),
74
  }
75
- ),
 
76
  reference_urls=["https://github.com/molecularsets/moses", "https://tdcommons.ai/functions/oracles/"],
77
  )
78
 
 
72
  "generated_smiles": datasets.Value("string"),
73
  "train_smiles": datasets.Value("string"),
74
  }
75
+ ),\
76
+
77
  reference_urls=["https://github.com/molecularsets/moses", "https://tdcommons.ai/functions/oracles/"],
78
  )
79