mmathys commited on
Commit
534a595
1 Parent(s): e588f6f

added data

Browse files
Files changed (2) hide show
  1. app.py +10 -4
  2. data.csv +6 -0
app.py CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  # %%
2
  import gradio as gr
3
 
@@ -5,15 +10,14 @@ import gradio as gr
5
  def sentence_builder(model, dataset):
6
  return f"Safety card for {model} and {dataset}."
7
 
8
-
9
  iface = gr.Interface(
10
  sentence_builder,
11
  [
12
  gr.Dropdown(
13
- ["microsoft/resnet-34", "microsoft/resnet-50"], label="Model", info="Select a model to use for testing."
14
  ),
15
  gr.Dropdown(
16
- ["marmal88/skin_cancer"], label="Dataset", info="Select the sampling dataset to use for testing."
17
  ),
18
  #gr.CheckboxGroup(["USA", "Japan", "Pakistan"], label="Countries", info="Where are they from?"),
19
  #gr.Radio(["park", "zoo", "road"], label="Location", info="Where did they go?"),
@@ -24,7 +28,7 @@ iface = gr.Interface(
24
  ],
25
  gr.Label(num_top_classes=4),
26
  examples=[
27
- ["microsoft/resnet-34", "marmal88/skin_cancer"],
28
  #[2, "cat", ["Japan", "Pakistan"], "park", ["ate", "swam"], True],
29
  #[4, "dog", ["Japan"], "zoo", ["ate", "swam"], False],
30
  #[10, "bird", ["USA", "Pakistan"], "road", ["ran"], False],
@@ -33,3 +37,5 @@ iface = gr.Interface(
33
  )
34
 
35
  iface.launch()
 
 
 
1
+ # %%
2
+ import pandas as pd
3
+ df = pd.read_csv("data.csv")
4
+ df
5
+
6
  # %%
7
  import gradio as gr
8
 
 
10
  def sentence_builder(model, dataset):
11
  return f"Safety card for {model} and {dataset}."
12
 
 
13
  iface = gr.Interface(
14
  sentence_builder,
15
  [
16
  gr.Dropdown(
17
+ list(df["friendly_name"]), label="Model", info="Select a model to use for testing."
18
  ),
19
  gr.Dropdown(
20
+ ["marmal88/skin_cancer"], value="marmal88/skin_cancer", label="Dataset", info="Select the sampling dataset to use for testing."
21
  ),
22
  #gr.CheckboxGroup(["USA", "Japan", "Pakistan"], label="Countries", info="Where are they from?"),
23
  #gr.Radio(["park", "zoo", "road"], label="Location", info="Where did they go?"),
 
28
  ],
29
  gr.Label(num_top_classes=4),
30
  examples=[
31
+ ["ViT", "marmal88/skin_cancer"],
32
  #[2, "cat", ["Japan", "Pakistan"], "park", ["ate", "swam"], True],
33
  #[4, "dog", ["Japan"], "zoo", ["ate", "swam"], False],
34
  #[10, "bird", ["USA", "Pakistan"], "road", ["ran"], False],
 
37
  )
38
 
39
  iface.launch()
40
+
41
+ # %%
data.csv ADDED
@@ -0,0 +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
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)
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
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
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)
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