File size: 531 Bytes
b81628e
 
 
 
0c94397
 
543b514
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import evaluate
from evaluate.utils import launch_gradio_widget

module = evaluate.load("jordyvl/ece")
launch_gradio_widget(module)

"""
import gradio as gr

metric = ECE()

iface = gr.Interface(
  fn=compute, 
  inputs=gr.inputs.Dataframe(headers=["predictions", "references"], col_width=2, datatype="number"),
  outputs=gr.outputs.Textbox(label="accuracy"),
  description=metric.info.description,
  article=metric.info.citation,
 )
 
iface.launch()

#might be nice to also plot reliability diagram

have sliders for kwargs :)
"""