-
Conda Environment:
- Install conda if you don't have it already
- Create the conda environment:
conda env create -f hindsight_server_env.yml
- Activate the env using:
conda activate hindsight_server
-
Initialization:
- Setup ngrok to allow querying over internet (Optional):
- First download ngrok and setup account
ngrok http https://localhost:6000
- Set
INTERNET_URL
equal to the ngrok forwarding address (should end in.ngrok-free.app
) at the top ofhindsight_server/initialize_server.py
- Copy
hindsight_server/res/template_san.cnf
tohindsight_server/res/san.cnf
- Fill in sections under dn besides CN in
hindsight_server/res/san.cnf
- Run:
export PYTHONPATH=$(pwd):$PYTHONPATH
to add hindsight to your python path. Currently, this will need to be run everytime you go to run hindsight in a new terminal. - Run:
hindsight_server/initialize_server.py
- Setup ngrok to allow querying over internet (Optional):
-
Running
- For querying you may need to change the LLM and Embedding models in
hindsight_server/config.py
depending on your machine - Run:
bash start_server.sh
- This starts both the
server_backend.py
which just runs as a python process and therun_server.py
which runs as a WSGI server using Flask and Gevent.
- This starts both the
- For querying you may need to change the LLM and Embedding models in
- Open
hindsight_android
in Android Studio. - Activate developer mode on your device.
- You should be good to run the app on your device!
- Note when the computer wifi changes, querying should still work using ngrok, but in order to upload images again you will need to:
- Run:
python hindsight_server/initialize_server.py
- Rebuild the app and install on your device
- Run: