Skip to content

A multilingual semantic search engine for nerd fonts icons

License

Notifications You must be signed in to change notification settings

jackjyq/nerd-fonts-icon-search

Repository files navigation

Nerd Fonts Icon Search

A multilingual semantic search engine for nerd fonts icons

Architecture

Backend

quick start

# essential packages to run cloud embedding function
pip install -r requirement.txt

# additional packages to run local embedding function
pip install sentence-transformers

# (optional) additional packages to use cuda to run local embedding function
# see https://pytorch.org/

# start server
#   on the first run, it build the database on ./model/chromadb
python main.py

deploy

on localhost, upload the database to remote

scp -r .\model\chromadb\ $REMOTE_HOST:$PROJECT_PATH\model

on remote host, create config.py with the following lines and edit

from default_config import Config

USER_CONFIG = Config(
    huggingface_api_key=...
)

on remote host, install the dependencies and start the server

# on remote host, only install the essential packages
pip install -r requirement.txt

# assuming that the database `./model/chromadb` has already been uploaded
#   also, you need to set up an valid `huggingface_api_key`
python main.py

set up uvicorn and Nginx to serve the backend

Frontend

quick start

# in `$PROJECT_ROOT/frontend` folder
npm install

npm start

deploy

copy .env to .env.local and edit

REACT_APP_BACKEND_SERVER= ...

build and upload static files

# in localhost `$PROJECT_ROOT/frontend` folder
npm run build

# upload build dir to remote server
scp -r .\build\ $REMOTE_HOST:$PROJECT_PATH\frontend\build

set up Nginx to serve static content

References

About

A multilingual semantic search engine for nerd fonts icons

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages