Spaces:
Sleeping
Sleeping
File size: 3,860 Bytes
c8a4fff c6852a0 c8a4fff 078a76a 566a8bc 078a76a 566a8bc 078a76a 58ba044 078a76a 58ba044 078a76a 58ba044 078a76a 566a8bc 69e78a2 566a8bc 58ba044 078a76a 58ba044 078a76a 58ba044 078a76a c8a4fff 078a76a c8a4fff 138ffb5 c8a4fff c4ccc83 0e71624 58ba044 0e71624 0f9fe05 0e71624 303d711 0e71624 0f9fe05 c4ccc83 0e71624 58ba044 0e71624 69e78a2 0f9fe05 0e71624 303d711 b6c6101 566a8bc 078a76a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
import gradio as gr
import pandas as pd
# 文件路径
file_path1_1 = 'Generation.csv'
file_path1_2 = 'Revision.csv'
file_path1_3 = 'Safety& Responsibility.csv'
file_path2_1 = 'Alignment with Instruction.csv'
file_path2_2 = 'Image Integrity.csv'
file_path2_3 = 'Image Aesthetics.csv'
file_path3_1 = 'Alignment with Reference.csv'
file_path3_2 = 'Revision Image Integrity.csv'
file_path3_3 = 'Revision Image Aesthetics.csv'
dff1_1 = pd.read_csv(file_path1_1)
dff1_2 = pd.read_csv(file_path1_2)
dff1_3 = pd.read_csv(file_path1_3)
dff2_1 = pd.read_csv(file_path2_1)
dff2_2 = pd.read_csv(file_path2_2)
dff2_3 = pd.read_csv(file_path2_3)
dff3_1 = pd.read_csv(file_path3_1)
dff3_2 = pd.read_csv(file_path3_2)
dff3_3 = pd.read_csv(file_path3_3)
def display_table(table_choice):
if table_choice == "Option 1: New Image Generation Quality Ranking":
return dff1_1
elif table_choice == "Option 2: Safety and Responsibility Ranking":
return dff1_3
elif table_choice == "----Dimension 1-Alignment with Instruction":
return dff2_1
elif table_choice == "----Dimension 2-Image Integrity":
return dff2_2
elif table_choice == "----Dimension 3-Image Aesthetics":
return dff2_3
def display_table2(table_choice):
if table_choice == "Image Revision Test Ranking":
return dff1_2
elif table_choice == "----Dimension 1-Alignment with Reference":
return dff3_1
elif table_choice == "----Dimension 2-Revised Image Integrity":
return dff3_2
elif table_choice == "----Dimension 3-Revised Image Aesthetics":
return dff3_3
with gr.Blocks() as demo:
gr.Markdown(
"""
# Evaluation of Image Generation Capabilities of Artificial Intelligence Models / 人工智能模型图像生成能力综合评测
by Zhenhui (Jack) Jiang<sup>1</sup>, Zhengyu Wu<sup>1</sup>, Jiaxin Li<sup>1</sup>, Haozhe Xu<sup>2</sup>, Yifan Wu<sup>1</sup>,Yi Lu<sup>1</sup>/ 蒋镇辉<sup>1</sup>,武正昱<sup>1</sup>,李佳欣<sup>1</sup>,徐昊哲<sup>2</sup>,吴轶凡<sup>1</sup>,鲁艺<sup>1</sup><br>
<sup>1</sup>HKU Business School, <sup>2</sup>School of Management, Xi'an Jiaotong University<br>
For access to the full research report, please contact Prof. Jiang at jiangz@hku.hk.
"""
)
with gr.Tab("🎨New Img Generation"):
with gr.Column():
dropdown = gr.Dropdown(choices=["Option 1: New Image Generation Quality Ranking",
"----Dimension 1-Alignment with Instruction",
"----Dimension 2-Image Integrity",
"----Dimension 3-Image Aesthetics",
"Option 2: Safety and Responsibility Ranking"],
label="Select a Leaderboard",
value="Option 1: New Image Generation Quality Ranking")
output = gr.DataFrame(value=dff1_1, max_height =900)
dropdown.change(fn=display_table, inputs=dropdown, outputs=output)
with gr.Tab("🖼️Img Revision"):
with gr.Column():
dropdown2 = gr.Dropdown(choices=["Image Revision Test Ranking", "----Dimension 1-Alignment with Reference",
"----Dimension 2-Revised Image Integrity",
"----Dimension 3-Revised Image Aesthetics"],
label="Select a Leaderboard",
value="Image Revision Test Ranking")
output2 = gr.DataFrame(value=dff1_2, max_height =900)
dropdown2.change(fn=display_table2, inputs=dropdown2, outputs=output2)
demo.launch() |