This repository is a modification of: https://github.com/openai/gpt-2 for our specific purposes
The objective of this API is to provide the 3 best possible responses to sentences that the user would input via http GET request as a parameter. This API that can help developers use GPT2 for their web application projects without the hassle of figuring out how GPT2 works.
This API was used in a dating app project, where given the sentences the users exchanged the API had to suggest following up questions to keep the flow of the conversation going.
How it works?
This web API manages inputs and outputs with HTTP GET requests. The developer should wrap the users sentence in an URL in the following way:
The output of this API is in JSON format under the “sentences” field as a list of strings of size 3. This is a response from the previous GET request.
How to run?
- First open the project in your favorite IDE
- Execute the python script where the flask API runs (app.py) using this command
You can use other parameters as –port to modify the default deployed port which is 5000
- Wait until the API is running and test URL with Postman or your favorite browser
Authors: Paulina Acosta, Usman Tariq, Michael Duboc