忘记密码

main
cm 2 months ago
parent 4666a55334
commit 7b182f7600

@ -3,6 +3,7 @@ from templates.user_info import show_user_info_form
from templates.recommendations import show_recommendations_tab from templates.recommendations import show_recommendations_tab
from templates.recommendations import show_virtual_tryon_tab from templates.recommendations import show_virtual_tryon_tab
# 页面设置 # 页面设置
st.set_page_config(page_title="智能穿搭助手", page_icon="👗", layout="wide") st.set_page_config(page_title="智能穿搭助手", page_icon="👗", layout="wide")

@ -1,6 +1,8 @@
import os import os
from dotenv import load_dotenv from dotenv import load_dotenv
# 中国主要城市中英文对照表 # 中国主要城市中英文对照表
CITY_NAME_MAPPING = { CITY_NAME_MAPPING = {
# 直辖市 # 直辖市

@ -9,6 +9,7 @@ from utils.image_processing import process_image_for_try_on
from config import MOONSHOT_API_KEY from config import MOONSHOT_API_KEY
def show_recommendations_tab(): def show_recommendations_tab():
st.header("智能穿搭推荐") st.header("智能穿搭推荐")

@ -1,5 +1,6 @@
import streamlit as st import streamlit as st
def show_user_info_form(): def show_user_info_form():
with st.sidebar: with st.sidebar:
st.header("个人信息") st.header("个人信息")

@ -2,6 +2,7 @@ import cv2
import numpy as np import numpy as np
from PIL import Image from PIL import Image
def process_image_for_try_on(image): def process_image_for_try_on(image):
"""处理上传的试衣图片""" """处理上传的试衣图片"""
img_array = np.array(image) img_array = np.array(image)

@ -5,6 +5,7 @@ from io import BytesIO
from PIL import Image from PIL import Image
import streamlit as st import streamlit as st
try: try:
import tensorflow as tf import tensorflow as tf
from tensorflow.keras.datasets import fashion_mnist from tensorflow.keras.datasets import fashion_mnist

@ -1,6 +1,7 @@
import requests import requests
from config import CITY_NAME_MAPPING, WEATHER_API_KEY from config import CITY_NAME_MAPPING, WEATHER_API_KEY
def get_weather_data(city, api_key=WEATHER_API_KEY): def get_weather_data(city, api_key=WEATHER_API_KEY):
"""获取天气数据""" """获取天气数据"""
base_url = "http://api.openweathermap.org/data/2.5/weather" base_url = "http://api.openweathermap.org/data/2.5/weather"

Loading…
Cancel
Save