jordyvl commited on
Commit
7d663d0
1 Parent(s): 3a2a2ed

small typo

Browse files
Files changed (1) hide show
  1. local_app.py +4 -3
local_app.py CHANGED
@@ -7,7 +7,7 @@ import gradio as gr
7
  import numpy as np
8
  import pandas as pd
9
  import ast
10
- from ece import ECE # loads local instead
11
 
12
 
13
  import matplotlib.pyplot as plt
@@ -54,7 +54,8 @@ sample_data = [[component] + slider_defaults] ##json.dumps(df)
54
 
55
 
56
  local_path = Path(sys.path[0])
57
- metric = ECE()
 
58
  # module = evaluate.load("jordyvl/ece")
59
  # launch_gradio_widget(module)
60
 
@@ -118,7 +119,7 @@ def reliability_plot(results):
118
  # if upper edge then minus binsize; same for center [but half]
119
  # rwidth is dependent on the binning
120
  B, bins, patches = ax1.hist(
121
- results["y_bar"], weights=p.nan_to_num(results["p_bar"][:-1], copy=True, nan=0)
122
  )
123
  colors = over_under_confidence(results)
124
  for b in range(len(B)):
 
7
  import numpy as np
8
  import pandas as pd
9
  import ast
10
+ #from ece import ECE # loads local instead
11
 
12
 
13
  import matplotlib.pyplot as plt
 
54
 
55
 
56
  local_path = Path(sys.path[0])
57
+ metric = evaluate.load("jordyvl/ece")
58
+ #ECE()
59
  # module = evaluate.load("jordyvl/ece")
60
  # launch_gradio_widget(module)
61
 
 
119
  # if upper edge then minus binsize; same for center [but half]
120
  # rwidth is dependent on the binning
121
  B, bins, patches = ax1.hist(
122
+ results["y_bar"], weights=np.nan_to_num(results["p_bar"][:-1], copy=True, nan=0)
123
  )
124
  colors = over_under_confidence(results)
125
  for b in range(len(B)):