Code Monkey home page Code Monkey logo

gpt3-procurement-classifier-api's Introduction

Simple GPT-3 API for One-shot Procurement Classification

This project is a simple prototype aimed to give a demonstration of how fine-tuning Large Language Models like GPT-3 is a simple and very effective way of creating a recommendation system.

API

Documentation and Testing

Please refer to http://139.59.133.64/docs

About

Large language models are very powerful tools for natural language processing, and this of course includes classification tasks. In the current case of extracting attributes from a free input query, we can see that the model performs significantly well on a high level classification with just a few basic examples given directly with the prompt.

Fine-tuning GPT-3 (or other open source language models like GPT-2) with a more suitable training set (i.e. from real use-cases) including input queries and their corresponding categories would be a simple and highly effective solution for creating a state-of-the-art recommendation system.

Run Locally with Docker

You will need to setup an account at https://openai.com/api/ and get your API KEY.
If you are new to Docker, click here to install and get started.

  1. Pull docker image from hub docker pull plasticfruits/gpt3-classifier
  2. Run container docker run -e OPENAI_API_KEY={your API KEY} --name mycontainer -p 80:80 plasticfruits/gpt3-classifier
  3. Open the URL where the app is being served [http://0.0.0.0:80]
  4. Exit with ctrl + c

Notes

  • See prompt.txt for reference on the prompt text that I used.
  • There is a limit on the quota for the API usage, too much use will lead to blocking the requests to avoid further costs.
  • This is not intended as a working solution but as a demonstration of its possibilities.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.