Spaces:
Runtime error
Runtime error
File size: 724 Bytes
67dc00b 8d3b05d 475ac6e 67dc00b 8d3b05d 475ac6e 8d3b05d |
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 |
import streamlit as st
from PIL import Image
import core
# 加载模型和其他必要的库
# Streamlit 应用程序
def main():
st.title("颜值打分应用")
uploaded_image = st.file_uploader("上传一张图片", type=["png", "jpg", "jpeg"])
if uploaded_image is not None:
# 读取上传的图片
image = Image.open(uploaded_image)
# 在界面上显示图片
st.image(image, caption="上传的图片", use_column_width=True)
# 使用模型进行颜值打分
# score = model.predict(image)
score = core.fun(uploaded_image)
# 在界面上显示颜值分数
st.write("颜值打分:", score)
if __name__ == "__main__":
main()
|