minimaxir/gpt-2-cloud-run

Request for Contribution: Add webpage GUI for GPT-2-based APIs

minimaxir opened this issue · 4 comments

Part of the reason I am building gpt-2-cloud-run is for easy integration with a web-based front end.

Unfortunately, I suck at front-ends and don't know best practices. (Ideally, I want something similar to OpenAI's UI which has parameter selection and input capabilities for inline autocompletion)

D558q4kWwAArEek

I'll need help for a simple web-based frontend that's flexible. Some feature specifications:

  • A single HTML file with the app (no external JS/CSS; including from a CDN is OK).
  • Supports all parameters that the default API supports. (e.g. length, temperature, top_k)
  • A button for submission which is disabled on click until a response/error is received (to prevent double-submissions since they are slow)

Heya, Max: are you thinking the UI should be standalone, with a config option (maybe saved in LocalStorage) to point to an existing gpt-2-cloud-run endpoint? Or do you imagine it would be part of this Cloud Run container, adding a Starlette route for the UI?

UI should be standalone .html file that points to the API (i.e. a config parameter), and not a part of the container. The reason for this is if it's a part of the container, it'll result in a blank screen when doing the initial GET request to boot it up.

Update: working on this in the ui branch.

Done!