This repository contains a demonstration of the DataFog Instructor SDK using Ollama and Streamlit. It showcases the named entity recognition (NER) capabilities of the SDK in an interactive web application.
- Python 3.10 or higher
- Docker (optional, for Docker-based setup)
- Ollama (required for non-Docker setup)
-
Clone this repository:
git clone https://github.com/datafog/datafog-instructor/datafog-ollama-demo.git cd datafog-ollama-demo
-
Build the Docker image:
docker build -t datafog-demo .
-
Run the Docker container:
docker run -p 8501:8501 datafog-demo
-
Open your web browser and navigate to
http://localhost:8501
to access the demo.
-
Clone this repository:
git clone https://github.com/datafog/datafog-instructor/datafog-ollama-demo.git cd datafog-ollama-demo
-
Install Ollama by following the instructions at https://ollama.ai/
-
Create and activate a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required Python packages:
pip install -r requirements.txt
-
Start the Ollama server:
ollama serve
-
In a new terminal window, start the Streamlit app:
streamlit run app.py
-
Open your web browser and navigate to
http://localhost:8501
to access the demo.
Once the application is running:
- Enter text in the provided input field.
- Click the "Detect Entities" button.
- View the detected entities and their types in the results section.
You can customize the entity types and models used by modifying the app.py
file. Refer to the DataFog Instructor SDK documentation for more details on available options.
- If you encounter any issues with Ollama, ensure it's properly installed and the server is running.
- For Docker-related issues, make sure Docker is installed and running on your system.
- If you face any problems with the Streamlit app, check the console output for error messages.
Contributions to improve the demo are welcome! Please feel free to submit issues or pull requests.
This project is licensed under the MIT License. See the LICENSE file for details.
If you encounter any problems or have questions, please open an issue in this repository or contact support@datafog.ai.