50_outputs / app.py
linbojunzi's picture
Update app.py
252dd73 verified
raw
history blame contribute delete
775 Bytes
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("---")