Skip to content

jordanopensource/nuha-api

Repository files navigation

Logo

nuha-api

The community hub for JOSA.

Explore the docs »

Visit the Portal . Report Bug . Request Feature

Build Status

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgements

About The Project

This is a API client for the Nuha Project.

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. 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

    git clone https://github.com/jordanopensource/nuha-api.git
  2. Create a virtual environment

    python3 -m venv venv
  3. Activate the virtual environment

     source venv/bin/activate
  4. Install the dependencies

    pip install -r requirements.txt

Running

Development

To run the project locally for development purposes:

  1. Activate the virtual environment

     source venv/bin/activate
  2. Run the project

     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

    docker build -t nuha-api .
  2. Run the Docker container

     docker run -d -p 8000:8000 -e HUGGINGFACE_TOKEN="" -e MODEL_PATH="" -e MODEL_VERSION="" nuha-api

Roadmap

See the open 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 for more information.


Contact

Jordan Open Source Association - @jo_osa

Project Link: https://github.com/jordanopensource/nuha-api