CathieDaDa commited on
Commit
566a8bc
·
verified ·
1 Parent(s): 54a041e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -20
app.py CHANGED
@@ -25,26 +25,26 @@ dff3_3 = pd.read_csv(file_path3_3)
25
 
26
 
27
  def display_table(table_choice):
28
- if table_choice == "--Option 1.1: New Image Generation Quality Ranking":
29
  return dff1_1
30
- elif table_choice == "Option 2: Image Revision Test Ranking":
31
- return dff1_2
32
- elif table_choice == "--Option 1.2: Safety and Responsibility Ranking":
33
  return dff1_3
34
- elif table_choice == "----Option 1.1.1: Dimension 1-Alignment with Instruction":
35
  return dff2_1
36
- elif table_choice == "----Option 1.1.2: Dimension 2-Image Integrity":
37
  return dff2_2
38
- elif table_choice == "----Option 1.1.3: Dimension 3-Image Aesthetics":
39
  return dff2_3
40
- elif table_choice == "--Option 2.1: Dimension 1-Alignment with Reference":
 
 
 
 
41
  return dff3_1
42
- elif table_choice == "--Option 2.2: Dimension 2-Image Integrity":
43
  return dff3_2
44
- elif table_choice == "--Option 2.3: Dimension 3-Image Aesthetics":
45
  return dff3_3
46
- elif table_choice == "Option 1: New Image Generation Test Ranking":
47
- return dff1_1,dff1_3
48
 
49
  with gr.Blocks() as demo:
50
  gr.Markdown(
@@ -57,18 +57,28 @@ with gr.Blocks() as demo:
57
  )
58
 
59
 
60
- with gr.Column():
61
- dropdown = gr.Dropdown(choices=["Option 1: New Image Generation Test Ranking", "--Option 1.1: New Image Generation Quality Ranking",
62
- "----Option 1.1.1: Dimension 1-Alignment with Instruction",
63
- "----Option 1.1.2: Dimension 2-Image Integrity",
64
- "----Option 1.1.3: Dimension 3-Image Aesthetics", "--Option 1.2: Safety and Responsibility Ranking",
65
- "Option 2: Image Revision Test Ranking", "--Option 2.1: Dimension 1-Alignment with Reference",
66
- "--Option 2.2: Dimension 2-Image Integrity","--Option 2.3: Dimension 3-Image Aesthetics"],
67
  label="Select a Leaderboard",
68
- value="--Option 1.1: New Image Generation Quality Ranking")
69
 
70
  output = gr.DataFrame(value=dff1_1, max_height =900)
71
 
72
  dropdown.change(fn=display_table, inputs=dropdown, outputs=output)
73
 
 
 
 
 
 
 
 
 
 
 
 
74
  demo.launch()
 
25
 
26
 
27
  def display_table(table_choice):
28
+ if table_choice == "Option 1: New Image Generation Quality Ranking":
29
  return dff1_1
30
+ elif table_choice == "Option 2: Safety and Responsibility Ranking":
 
 
31
  return dff1_3
32
+ elif table_choice == "--Option 1.1: Dimension 1-Alignment with Instruction":
33
  return dff2_1
34
+ elif table_choice == "--Option 1.2: Dimension 2-Image Integrity":
35
  return dff2_2
36
+ elif table_choice == "--Option 1.3: Dimension 3-Image Aesthetics":
37
  return dff2_3
38
+
39
+ def display_table2(table_choice):
40
+ if table_choice == "Option 1: Image Revision Test Ranking":
41
+ return dff1_2
42
+ elif table_choice == "--Option 1.1: Dimension 1-Alignment with Reference":
43
  return dff3_1
44
+ elif table_choice == "--Option 1.2: Dimension 2-Revised Image Integrity":
45
  return dff3_2
46
+ elif table_choice == "--Option 1.3: Dimension 3-Revised Image Aesthetics":
47
  return dff3_3
 
 
48
 
49
  with gr.Blocks() as demo:
50
  gr.Markdown(
 
57
  )
58
 
59
 
60
+ with gr.Column("New Image Generation Test Ranking"):
61
+ dropdown = gr.Dropdown(choices=["Option 1: New Image Generation Quality Ranking",
62
+ "--Option 1.1: Dimension 1-Alignment with Instruction",
63
+ "--Option 1.2: Dimension 2-Image Integrity",
64
+ "--Option 1.3: Dimension 3-Image Aesthetics",
65
+ "Option 2: Safety and Responsibility Ranking"],
 
66
  label="Select a Leaderboard",
67
+ value="Option 1.1: New Image Generation Quality Ranking")
68
 
69
  output = gr.DataFrame(value=dff1_1, max_height =900)
70
 
71
  dropdown.change(fn=display_table, inputs=dropdown, outputs=output)
72
 
73
+ with gr.Column("Image Revision Test Ranking"):
74
+ dropdown2 = gr.Dropdown(choices=["Option 1: Image Revision Test Ranking", "--Option 1.1: Dimension 1-Alignment with Reference",
75
+ "--Option 1.2: Dimension 2-Revised Image Integrity",
76
+ "--Option 1.3: Dimension 3-Revised Image Aesthetics"],
77
+ label="Select a Leaderboard",
78
+ value="Option 1: Image Revision Test Ranking")
79
+
80
+ output2 = gr.DataFrame(value=dff1_2, max_height =900)
81
+
82
+ dropdown.change(fn=display_table2, inputs=dropdown2, outputs=output2)
83
+
84
  demo.launch()