Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,21 +3,24 @@ import json
|
|
3 |
|
4 |
# 加载 JSON 数据
|
5 |
with open("qwen2vl_50.json", "r") as file:
|
6 |
-
|
|
|
|
|
7 |
|
8 |
# Streamlit 应用
|
9 |
st.title("JSON Data Visualization")
|
10 |
|
11 |
# 遍历数据并显示内容
|
12 |
-
for
|
13 |
# 解构数据
|
14 |
-
image_name, image_url, description,
|
15 |
-
|
16 |
# 显示图像
|
17 |
-
st.subheader(f"{image_name}
|
18 |
st.image(image_url, caption=description, use_column_width=True)
|
19 |
|
20 |
# 显示文本信息
|
21 |
st.markdown(f"**Description:** {description}")
|
22 |
-
st.markdown(f"**
|
|
|
23 |
st.markdown("---")
|
|
|
3 |
|
4 |
# 加载 JSON 数据
|
5 |
with open("qwen2vl_50.json", "r") as file:
|
6 |
+
qwen_data = json.load(file)
|
7 |
+
with open("qwen2vl_50.json", "r") as file:
|
8 |
+
gpt_data = json.load(file)
|
9 |
|
10 |
# Streamlit 应用
|
11 |
st.title("JSON Data Visualization")
|
12 |
|
13 |
# 遍历数据并显示内容
|
14 |
+
for qwen,gpt in zip(qwen_data,gpt_data):
|
15 |
# 解构数据
|
16 |
+
image_name, image_url, description, qwen_category = qwen
|
17 |
+
_, _, _, gpt_category = gpt
|
18 |
# 显示图像
|
19 |
+
st.subheader(f"{image_name}")
|
20 |
st.image(image_url, caption=description, use_column_width=True)
|
21 |
|
22 |
# 显示文本信息
|
23 |
st.markdown(f"**Description:** {description}")
|
24 |
+
st.markdown(f"**Qwen_Category:** {qwen_category}")
|
25 |
+
st.markdown(f"**GPT_Category:** {gpt_category}")
|
26 |
st.markdown("---")
|