This repository is a modification of: 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:

http://localhost:5000/?bio=[user sentence]



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?

  1. First open the project in your favorite IDE
  2. Execute the python script where the flask API runs ( using this command
flask run

You can use other parameters as –port to modify the default deployed port which is 5000

  1. Wait until the API is running and test URL with Postman or your favorite browser


Authors: Paulina Acosta, Usman Tariq, Michael Duboc


View Github