/AI_googletrend_tag

find trending keywords as article's tags

Primary LanguagePythonApache License 2.0Apache-2.0

AI_googletrend_tag License

This is a project for tagging articles with trending keywords

FastAPI Demo

Run app: uvicorn main:app
Swagger UI page: http://127.0.0.1:8000/docs

Structure

Concept: Embeds articles & keywords in to tokens then calculate the vectors similarity

SystemInfo

Ubuntu 20.04.1 LTS
Cuda 10.1
python 3.8.5

Install all the required packages.

To install all dependencies, run the following command:

pip install -r requirements.txt

Input & output data structure

input

[
{"title1":str,"content1":str},
{"title2":str,"content2":str},
...
]

output: tags sort by score(descent)

{
"title1":{
 "tag1": score,
 "tag2": score,
 },
...
}

Reference

pytrend: https://github.com/GeneralMills/pytrends
MACLR: https://github.com/amzn/pecos/tree/mainline/examples/MACLR
For download pretrain model / training models, please check MACLR team's work