A multilingual semantic search engine for nerd fonts icons
- Frontend: Material UI
- App server: FastAPI
- Model: ChromaDB
# 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
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
# in `$PROJECT_ROOT/frontend` folder
npm install
npm start
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