CoolFace
Apppublic

FrankHUP/MouseBrain-2dto3d

sourceHugging Faceupdated 5mo agoView on Hugging Face
0likes
App README

Deploy in local

setup virtual environnement

bash
python3.11 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

export variables

bash
# Set the app local mode
export MOUSE_DEMO_LOCAL_DEV=1
export MOUSE_DEMO_DEVICE=auto
export IDLE_UNLOAD_SECONDS=0
# only if you want to use local data 
export FAISS_LOCAL_OVERRIDE=/home/frank/sbh-assistant/sbh-mouse-rag/out/index/patch_index.faiss
export MANIFEST_LOCAL_OVERRIDE=/home/frank/sbh-assistant/sbh-mouse-rag/out/index/patch_manifest.parquet
export VECTORS_LOCAL_OVERRIDE=/home/frank/sbh-assistant/sbh-mouse-rag/out/index/patch_vectors.npy
export PATCH_PNG_BASE_OVERRIDE=http://localhost:8000/patch_png

local env setup

bash
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128

Reinstall sbh-mouse-rag package

bash
python -m pip install --upgrade --force-reinstall --no-deps git+https://github.com/linum-uqam/sbh-mouse-rag.git
bash
gradio app.py

Push reranker model

bash
hf upload FrankHUP/mousebrain-reranker /home/frank/sbh-assistant/sbh-mouse-rag/out/reranker/reranker_listwise_phase_a.pt reranker_listwise.pt

Push the index

bash
gcloud storage rsync /home/frank/sbh-assistant/sbh-mouse-rag/out/index/64 gs://mouse-rag/demo/v3 --recursive