FastMCP_RecSys

by attarmau
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Manages environment variables for both frontend and backend configurations of the fashion recommender.

  • Provides containerized deployment of the fashion recommendation system with separate containers for frontend, backend, and database services.

  • Powers the backend API that handles image processing and recommendation requests for the fashion recommender system.

FastMCP_RecSys

这是一个基于 CLIP 且带有 MCP 的时尚推荐器。

文件夹结构

/project-root │ ├── /backend │ ├── Dockerfile # Backend Dockerfile │ ├── /app │ │ ├── main.py # FastAPI app code │ │ └── requirements.txt # Python dependencies for the backend │ └── .env # Environment variables (make sure to add this to .gitignore) │ ├── /frontend │ ├── Dockerfile # Frontend Dockerfile │ ├── package.json # Node.js dependencies (for React) │ ├── package-lock.json # Lock file for React dependencies │ ├── /public │ │ └── index.html # HTML file for the frontend (React app is mounted here) │ ├── /src │ │ ├── App.js # Main React component │ │ └── index.js # React entry point │ ├── tailwind.config.js # Tailwind CSS config │ ├── postcss.config.js # PostCSS config │ └── .env # Frontend environment variables (add to .gitignore) │ ├── .gitignore # Git ignore file (include .env, node_modules, etc.) ├── docker-compose.yml # Docker Compose configuration └── README.md # Project documentation

步骤 1

更新 mongo 服务以添加相同的凭证:

mongo: image: mongo:latest ports: - "27017:27017" environment: MONGO_INITDB_ROOT_USERNAME: root MONGO_INITDB_ROOT_PASSWORD: example volumes: - mongo-data:/data/db

注意:由于在 FastAPI 应用程序中使用环境变量,Mongo URL 应如下所示:MONGO_URL =“mongodb://root:example@mongo:27017”

运行后,打开浏览器并转到👉 http://localhost:8081

登录方式:用户名:root / 密码:example(临时设置)

第 2 步

docker-compose up --build

这将:

  • 使用热重载启动 FastAPI 后端
  • 启动 MongoDB
  • 启动 Mongo Express(用于 DB UI)(此模式下不会自动构建前端)

步骤3

📌 快速提示

访问您的应用程序: http://localhost:8000/docs

查看 MongoDB UI: http://localhost:8081 (使用用户:root,密码:example)

mongo-seed 在启动时仅运行一次以填充您的标签集合。

📌 UI 示例组件

  1. 图片上传
  2. 提交按钮
  3. 显示服装标签+推荐
-
security - not tested
A
license - permissive license
-
quality - not tested

基于 CLIP 的时尚推荐系统,允许用户上传服装图像并根据视觉分析接收标签和推荐。

  1. Folder Structure
    1. Step 1
    2. Step 2
    3. Step 3
ID: aoxux8ydhh