This is a API client for the Nuha Project.
To get a local copy up and running follow these simple steps.
This project depends on a trained text classification model, which is hosted on Hugging Face. You can either train your own model or use the one provided by JOSA. The model is defined in environment variables, which are passed to the application at runtime:
- HUGGINGFACE_TOKEN: The Hugging Face API token.
- MODEL_PATH: The model path on Hugging Face.
- MODEL_VERSION: The model version on Hugging Face.
-
Clone the repo
git clone https://github.com/jordanopensource/nuha-api.git
-
Create a virtual environment
python3 -m venv venv
-
Activate the virtual environment
source venv/bin/activate
-
Install the dependencies
pip install -r requirements.txt
To run the project locally for development purposes:
-
Activate the virtual environment
source venv/bin/activate
-
Run the project
HUGGINGFACE_TOKEN="" MODEL_PATH="" MODEL_VERSION="" uvicorn app.main:app --reload
To build and run the project locally for production purposes:
-
Build the Docker image
docker build -t nuha-api .
-
Run the Docker container
docker run -d -p 8000:8000 -e HUGGINGFACE_TOKEN="" -e MODEL_PATH="" -e MODEL_VERSION="" nuha-api
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/amazing-feature
) - Commit your Changes (
git commit -m 'Add some amazing-feature'
) - Push to the Branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Distributed under the Apache License 2.0. See LICENSE for more information.
Jordan Open Source Association - @jo_osa
Project Link: https://github.com/jordanopensource/nuha-api