This project provides tools and services for bioethics research and applications. The following instructions explain how to set up and run the project using pixi.
Ensure you have the following installed on your system:
-
Install Ollama from ollama.com
-
Pull the default language model:
ollama pull llama3.2
Note: The default model is specified in
frontend/config.pyasGENERATION_MODEL = "llama3.2". If you wish to use a different model, modify this setting and pull that model instead.
-
Clone the repository:
git clone https://github.com/uw-ssec/bioethics.git cd bioethics -
Install dependencies:
pixi install
-
Run the Server:
pixi run server
-
Run the Interface (You might need to run it in another terminal):
pixi run streamlit
-
Access the services:
- Backend: http://localhost:8000
- Streamlit (Interface): http://localhost:8501
-
To stop the services, press
Ctrl+Cin the terminal.
-
To change the language model:
- Edit
frontend/config.pyand modify theGENERATION_MODELvariable - Pull the new model using
ollama pull YOUR_NEW_MODEL_NAME - Restart the services
- Edit
-
To customize prompt templates:
- Open
frontend/config.py - Modify the
PROMPT_TEMPLATESdictionary to edit existing templates or add new ones - Each template should include
{context}and{question}placeholders that will be replaced with retrieved content and user questions - After saving changes, restart the streamlit interface (pixi run streamlit) to see the updated templates
- Open
-
Modify the pixi configuration files to adjust service configurations or dependencies.
- Ensure no other services are using ports
8000or8501. - If you encounter issues with pixi, refer to the pixi documentation.
- For Ollama issues, check the Ollama documentation.
- Verify Ollama is running with
ollama listto see available models.
For further assistance, check the project issues section.
Statement from Schmidt Sciences:
Schmidt Sciences expects that any code from projects funded by Schmidt Sciences be released as open source under an OSI-approved permissive license (such as Apache v2.0 or MIT). We recommend that projects avoid using GPL due to known complexities associated with it. We encourage projects to publish data used for peer-reviewed scientific articles along with the code used to produce the results. Additionally, we recommend avoiding any license modifications for simplicity, and alignment with standard practices.