https://github.com/jordanopensource/nuha-api
API for NUHA
https://github.com/jordanopensource/nuha-api
Last synced: 3 months ago
JSON representation
API for NUHA
- Host: GitHub
- URL: https://github.com/jordanopensource/nuha-api
- Owner: jordanopensource
- License: apache-2.0
- Created: 2023-06-26T09:49:13.000Z (almost 2 years ago)
- Default Branch: development
- Last Pushed: 2024-02-01T09:59:43.000Z (over 1 year ago)
- Last Synced: 2024-05-28T21:47:58.010Z (12 months ago)
- Language: Python
- Homepage: https://nuha.api.josa.ngo
- Size: 50.8 KB
- Stars: 1
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
### nuha-api
The community hub for JOSA.
[Explore the docs »](https://github.com/jordanopensource/nuha-api)
[Visit the Portal]()
.
[Report Bug](https://github.com/jordanopensource/nuha-api/issues)
.
[Request Feature](https://github.com/jordanopensource/nuha-api/issues)[](https://builds.josa.ngo/jordanopensource/nuha-api)
Table of Contents
## About The Project
This is a API client for the [Nuha Project](https://nuha.josa.ngo).
### Built With 🤖
___
## Getting Started
To get a local copy up and running follow these simple steps.
### Prerequisites
This project depends on a trained text classification model, which is hosted on [Hugging Face](https://huggingface.co/). 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:
1. HUGGINGFACE_TOKEN: The Hugging Face API token.
2. MODEL_PATH: The model path on Hugging Face.
3. MODEL_VERSION: The model version on Hugging Face.### Installation
1. Clone the repo
```sh
git clone https://github.com/jordanopensource/nuha-api.git
```2. Create a virtual environment
```sh
python3 -m venv venv
```3. Activate the virtual environment
```sh
source venv/bin/activate
```4. Install the dependencies
```sh
pip install -r requirements.txt
```### Running
#### Development
To run the project locally for development purposes:
1. Activate the virtual environment
```sh
source venv/bin/activate
```2. Run the project
```sh
HUGGINGFACE_TOKEN="" MODEL_PATH="" MODEL_VERSION="" uvicorn app.main:app --reload
```#### Production
To build and run the project locally for production purposes:
1. Build the Docker image
```sh
docker build -t nuha-api .
```2. Run the Docker container
```sh
docker run -d -p 8000:8000 -e HUGGINGFACE_TOKEN="" -e MODEL_PATH="" -e MODEL_VERSION="" nuha-api
```___
## Roadmap
See the [open issues](https://github.com/jordanopensource/nuha-api/issues) for a list of proposed features (and known issues).
___
## Contributing
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**.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/amazing-feature`)
3. Commit your Changes (`git commit -m 'Add some amazing-feature'`)
4. Push to the Branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request___
## License
Distributed under the Apache License 2.0. See [LICENSE](LICENSE) for more information.
___
## Contact
Jordan Open Source Association - [@jo_osa](https://twitter.com/@jo_osa)
Project Link: [https://github.com/jordanopensource/nuha-api](https://github.com/jordanopensource/nuha-api)