John Graham Reynolds commited on
Commit
98d6fff
·
1 Parent(s): 1847cde

try something different with examples

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -22,7 +22,7 @@ Try to use \t to write some code? \t or how does that work? </p>
22
  article = "<p style='text-align: center'> Check out the [original repo](https://github.com/johngrahamreynolds/FixedMetricsForHF) housing this code, and a quickly \
23
  trained [multilabel text classification model](https://github.com/johngrahamreynolds/RoBERTa-base-DReiFT/tree/main) that makes use of it during evaluation.</p>"
24
 
25
- def show_off(predictions, references, weighting_map):
26
 
27
  f1 = FixedF1(average=weighting_map["f1"])
28
  precision = FixedPrecision(average=weighting_map["precision"])
@@ -44,5 +44,5 @@ gr.Interface(
44
  title=title,
45
  description=description,
46
  article=article,
47
- examples=[[[1, 0, 2, 0, 1], [1,0,0,0,1], {"f1":"weighted", "precision": "micro", "recall": "weighted"}]],
48
  ).launch()
 
22
  article = "<p style='text-align: center'> Check out the [original repo](https://github.com/johngrahamreynolds/FixedMetricsForHF) housing this code, and a quickly \
23
  trained [multilabel text classification model](https://github.com/johngrahamreynolds/RoBERTa-base-DReiFT/tree/main) that makes use of it during evaluation.</p>"
24
 
25
+ def show_off(predictions, references, weighting_map={"f1":"weighted", "precision": "micro", "recall": "weighted"}):
26
 
27
  f1 = FixedF1(average=weighting_map["f1"])
28
  precision = FixedPrecision(average=weighting_map["precision"])
 
44
  title=title,
45
  description=description,
46
  article=article,
47
+ examples=[[1, 0, 2, 0, 1], [1,0,0,0,1], {"f1":"weighted", "precision": "micro", "recall": "weighted"}],
48
  ).launch()