Spaces:
Sleeping
Sleeping
John Graham Reynolds
commited on
Commit
·
36affa5
1
Parent(s):
7cb142d
add return method
Browse files
app.py
CHANGED
|
@@ -30,7 +30,7 @@ def compute(input_df: pd.DataFrame, method: str):
|
|
| 30 |
metric.add_batch(predictions=predicted, references=references)
|
| 31 |
outputs = metric.compute()
|
| 32 |
|
| 33 |
-
f"Your metrics are as follows: \n {outputs}"
|
| 34 |
|
| 35 |
space = gr.Interface(
|
| 36 |
fn=compute,
|
|
@@ -44,7 +44,7 @@ space = gr.Interface(
|
|
| 44 |
gr.Radio(
|
| 45 |
["weighted", "micro", "macro", "None", "binary"],
|
| 46 |
label="Averaging Method",
|
| 47 |
-
info="Method for averaging the F1 score across labels. `
|
| 48 |
)
|
| 49 |
],
|
| 50 |
outputs=gr.Textbox(label=metric.name),
|
|
|
|
| 30 |
metric.add_batch(predictions=predicted, references=references)
|
| 31 |
outputs = metric.compute()
|
| 32 |
|
| 33 |
+
return f"Your metrics are as follows: \n {outputs}"
|
| 34 |
|
| 35 |
space = gr.Interface(
|
| 36 |
fn=compute,
|
|
|
|
| 44 |
gr.Radio(
|
| 45 |
["weighted", "micro", "macro", "None", "binary"],
|
| 46 |
label="Averaging Method",
|
| 47 |
+
info="Method for averaging the F1 score across labels. \n `binary` only works if you are evaluating a binary classification model."
|
| 48 |
)
|
| 49 |
],
|
| 50 |
outputs=gr.Textbox(label=metric.name),
|