File size: 535 Bytes
b81628e
 
 
 
0c94397
 
543b514
a3659c1
 
 
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
import evaluate
from evaluate.utils import launch_gradio_widget

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

"""
DEV: #might be nice to also plot reliability diagram
have sliders for kwargs :)

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()
"""