File size: 775 Bytes
e95972f
 
 
2d356c4
a6875a9
cefd9fc
9330031
cefd9fc
e95972f
2d356c4
e95972f
 
2d356c4
 
 
cefd9fc
 
2d356c4
 
252dd73
e95972f
2d356c4
 
 
 
 
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
import streamlit as st
import json

# 加载 JSON 数据
with open("qwen2vl_50.json", "r") as file:
    qwen_data = json.load(file)
with open("gpt4o_50.json", "r") as file:
    gpt_data = json.load(file)

# Streamlit 应用
st.title("JSON Data Visualization")

# 遍历数据并显示内容
for qwen,gpt in zip(qwen_data,gpt_data):
    # 解构数据
    image_name, image_url, description, qwen_category = qwen
    _, _, _, gpt_category = gpt
    # 显示图像
    st.subheader(f"{image_name}")
    st.image(image_url, caption=description, use_container_width=True)

    # 显示文本信息
    st.markdown(f"**Description:** {description}")
    st.markdown(f"**Qwen_Category:** {qwen_category}")
    st.markdown(f"**GPT_Category:** {gpt_category}")
    st.markdown("---")