Giter VIP home page Giter VIP logo

bangumi_spider's Introduction

1. 技术栈

1.1 bangumi_spider

爬虫

  • Scrapy
  • Requests
  • Xpath
  • MongoDB
  • ElasticSearch

1.2 recommend_model

特征工程、召回层模型、排序层模型

  • Pandas
  • Numpy
  • Matplotlib
  • TensorFlow2
  • Gensim
  • TesorFlow Serving
  • Docker

2. 运行

2.1 bangumi_spider

  1. 启动MongoDB

  2. 启动Redis

    redis-server "D:\Program Files\Redis-x64-5.0.9\redis.windows.conf"
  3. 启动ElasticSearch

  4. 全量爬取动画数据

    scrapy crawl anime
  5. 将所有的动画数据导入ElasticSearch

    mongodb-to-elasticsearch.py
  6. 全量爬取用户“看过”的动画

    scrapy crawl user
  7. 全量爬取用户“抛弃”的动画

    scrapy crawl user_dropped
  8. 全量爬取网站的动画标签

    scrapy crawl tag
  9. 实时增量爬取用户用户“看过”的动画

    scrapy crawl timeline

2.2 recommend_model

  1. 特征工程,生成训练集、测试集到CSV文件,生成用户特征、动画特征到Redis

    FeatureEng.py
  2. 召回层,生成用户和动画的Embedding向量

    embedding.py
  3. 排序层,训练模型

    WideNDeep.py

    使用TensorBoard

    tensorflow2 tensorboard可视化使用

    tensorboard.exe --logdir=D:\python_project\bangumi_spider\bangumi_spider\resources\tensorboardlog
    
    http://localhost:6006/ 
  4. 模型上线

    # 1. 拉取镜像
    docker pull tensorflow/serving
    # 2. 运行容器
    docker run -t --rm -p 8501:8501 -v "D:\IDEA\bangumi-recommend-system\src\main\resources\model\neuralcf:/models/recmodel" -e MODEL_NAME=recmodel tensorflow/serving

bangumi_spider's People

Contributors

titanxp avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.