https://github.com/natlibfi/finna-assistant
https://github.com/natlibfi/finna-assistant
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/natlibfi/finna-assistant
- Owner: NatLibFi
- Created: 2024-03-20T13:35:14.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-20T08:51:20.000Z (over 1 year ago)
- Last Synced: 2025-04-13T20:02:14.745Z (about 1 year ago)
- Language: Python
- Size: 4.11 MB
- Stars: 2
- Watchers: 6
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# finna-assistant
Finna assistant is a GPT-based chatbot interface that enables searching library, museum and archival records using the Finna search service.
## Installation
### Running with Python
#### Install dependencies
pip install -r requirements.txt
#### Set environment variables
The application requires that the environment variable `AZURE_OPENAI_KEY` is set.
#### Start the application
python app.py
The app will be available at http://127.0.0.1:7860. You can customize the port or host with the `GRADIO_SERVER_PORT` and `GRADIO_SERVER_NAME` environment variables.
### Running with Docker
#### Build the Docker image
docker build -t finna-assistant .
#### Run the container
docker run -p 7860:7860 -e AZURE_OPENAI_KEY= finna-assistant
## Run tests
Run the following command in the root of the project:
python tests/tests.py
## Generate embeddings files
Run the following command at the root of the project:
python scripts/generate_embeddings.py
This will regenerate the embeddings .pkl files in the `embeddings` folder based on the CSV files in the `data` folder. The script should be run whenever the files in the data folder are modified.