John Graham Reynolds commited on
Commit
86e4acf
Β·
1 Parent(s): 31ed20e

make sure predictions / references are ints

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -5,7 +5,7 @@ import evaluate
5
  import gradio as gr
6
  import pandas as pd
7
 
8
- title = "'Combine' multiple metrics with this πŸ€— Evaluate πŸͺ² Fix!"
9
 
10
  description = """<p style='text-align: center'>
11
  As I introduce myself to the entirety of the πŸ€— ecosystem, I've put together this Space to show off a temporary fix for a current πŸͺ² in the πŸ€— Evaluate library. \n
@@ -39,8 +39,8 @@ def evaluation(predictions, metrics) -> str:
39
 
40
  combined = evaluate.combine(combined_list)
41
 
42
- predicted = predictions["Predicted Class Label"].to_list()
43
- references = predictions["Actual Class Label"].to_list()
44
 
45
  combined.add(prediction=predicted, reference=references)
46
  outputs = combined.compute()
 
5
  import gradio as gr
6
  import pandas as pd
7
 
8
+ title = "`Combine` multiple metrics with this πŸ€— Evaluate πŸͺ² Fix!"
9
 
10
  description = """<p style='text-align: center'>
11
  As I introduce myself to the entirety of the πŸ€— ecosystem, I've put together this Space to show off a temporary fix for a current πŸͺ² in the πŸ€— Evaluate library. \n
 
39
 
40
  combined = evaluate.combine(combined_list)
41
 
42
+ predicted = [int(num) for num in predictions["Predicted Class Label"].to_list()]
43
+ references = [int(num) for num in predictions["Actual Class Label"].to_list()]
44
 
45
  combined.add(prediction=predicted, reference=references)
46
  outputs = combined.compute()