Spaces:
Runtime error
Runtime error
mess around
Browse files- app.py +6 -4
- data.csv +6 -6
- flagged/log.csv +0 -2
app.py
CHANGED
@@ -7,11 +7,13 @@ df = pd.read_csv("./data.csv")
|
|
7 |
def sentence_builder(model, dataset, displayed_metrics):
|
8 |
row = df[df["friendly_name"] == model]
|
9 |
str = (
|
10 |
-
f"## <span style='font-size:
|
11 |
-
f"
|
12 |
-
f"Evaluating on dataset `{dataset}`"
|
13 |
)
|
14 |
|
|
|
|
|
|
|
15 |
if "Accuracy" in displayed_metrics:
|
16 |
str += f"\nAccuracy: `{row['accuracy'].values[0]}`"
|
17 |
|
@@ -47,7 +49,7 @@ iface = gr.Interface(
|
|
47 |
label="Dataset",
|
48 |
info="Select the sampling dataset to use for testing.",
|
49 |
),
|
50 |
-
gr.CheckboxGroup(["Accuracy", "Precision", "Recall", "Robustness", "Fairness"], value=["Accuracy", "Robustness"], label="Metrics", info="Select displayed metrics."),
|
51 |
# gr.Radio(["park", "zoo", "road"], label="Location", info="Where did they go?"),
|
52 |
# gr.Dropdown(
|
53 |
# ["ran", "swam", "ate", "slept"], value=["swam", "slept"], multiselect=True, label="Activity", info="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed auctor, nisl eget ultricies aliquam, nunc nisl aliquet nunc, eget aliquam nisl nunc vel nisl."
|
|
|
7 |
def sentence_builder(model, dataset, displayed_metrics):
|
8 |
row = df[df["friendly_name"] == model]
|
9 |
str = (
|
10 |
+
f"## <span style='font-size: 16px;'>🚧 Performance and safety of <code style='font-weight: 400'>{model}</code></span>\n"
|
11 |
+
f"On dataset `{dataset}`\n"
|
|
|
12 |
)
|
13 |
|
14 |
+
if "Performance" in displayed_metrics:
|
15 |
+
str += f"\nPerformance: `{row['performance'].values[0]}`"
|
16 |
+
|
17 |
if "Accuracy" in displayed_metrics:
|
18 |
str += f"\nAccuracy: `{row['accuracy'].values[0]}`"
|
19 |
|
|
|
49 |
label="Dataset",
|
50 |
info="Select the sampling dataset to use for testing.",
|
51 |
),
|
52 |
+
gr.CheckboxGroup(["Performance", "Accuracy", "Precision", "Recall", "Robustness", "Fairness"], value=["Accuracy", "Robustness"], label="Metrics", info="Select displayed metrics."),
|
53 |
# gr.Radio(["park", "zoo", "road"], label="Location", info="Where did they go?"),
|
54 |
# gr.Dropdown(
|
55 |
# ["ran", "swam", "ate", "slept"], value=["swam", "slept"], multiselect=True, label="Activity", info="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed auctor, nisl eget ultricies aliquam, nunc nisl aliquet nunc, eget aliquam nisl nunc vel nisl."
|
data.csv
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
-
id,loss,accuracy,f1_macro,f1_micro,f1_weighted,precision_macro,precision_micro,precision_weighted,recall_macro,recall_micro,recall_weighted,friendly_name,robustness
|
2 |
-
#50807121081,0.0514,0.9867,0.9839,0.9867,0.9867,0.9845,0.9867,0.9873,0.9841,0.9867,0.9867,Swin Transformer (small),24
|
3 |
-
#50807121082,0.0341,0.9933,0.9920,0.9933,0.9933,0.9922,0.9933,0.9935,0.9919,0.9933,0.9933,ViT,27
|
4 |
-
#50807121083,0.9992,0.5067,0.3474,0.5067,0.3968,0.6261,0.5067,0.5996,0.4095,0.5067,0.5067,ResNet,3
|
5 |
-
#50807121084,0.0523,0.9800,0.9805,0.9800,0.9800,0.9857,0.9800,0.9809,0.9760,0.9800,0.9800,Swin Transformer (large),19
|
6 |
-
#50807121085,0.0393,0.9733,0.9707,0.9733,0.9732,0.9739,0.9733,0.9734,0.9679,0.9733,0.9733,BEiT,19
|
|
|
1 |
+
id,loss,accuracy,f1_macro,f1_micro,f1_weighted,precision_macro,precision_micro,precision_weighted,recall_macro,recall_micro,recall_weighted,friendly_name,robustness,performance
|
2 |
+
#50807121081,0.0514,0.9867,0.9839,0.9867,0.9867,0.9845,0.9867,0.9873,0.9841,0.9867,0.9867,Swin Transformer (small),24,12
|
3 |
+
#50807121082,0.0341,0.9933,0.9920,0.9933,0.9933,0.9922,0.9933,0.9935,0.9919,0.9933,0.9933,ViT,27,13
|
4 |
+
#50807121083,0.9992,0.5067,0.3474,0.5067,0.3968,0.6261,0.5067,0.5996,0.4095,0.5067,0.5067,ResNet,3,38
|
5 |
+
#50807121084,0.0523,0.9800,0.9805,0.9800,0.9800,0.9857,0.9800,0.9809,0.9760,0.9800,0.9800,Swin Transformer (large),19,12
|
6 |
+
#50807121085,0.0393,0.9733,0.9707,0.9733,0.9732,0.9739,0.9733,0.9734,0.9679,0.9733,0.9733,BEiT,19,12
|
flagged/log.csv
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
Model,Dataset,output,flag,username,timestamp
|
2 |
-
Swin Transformer (small),marmal88/skin_cancer,,,,2023-04-20 16:57:05.091724
|
|
|
|
|
|