Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom service web UI to replace default swagger UI #739

Closed
parano opened this issue May 29, 2020 · 2 comments · Fixed by #839
Closed

Custom service web UI to replace default swagger UI #739

parano opened this issue May 29, 2020 · 2 comments · Fixed by #839
Assignees
Labels
help-wanted An issue currently lacks a contributor

Comments

@parano
Copy link
Member

parano commented May 29, 2020

  • Currently when starting a BentoML API model server, it starts a simple web UI in addition to the API endpoints. This Web UI is generated with swagger API schema, it can be used for data scientists to test the API endpoint from a browser. But not ideal for a non-technical user to use.

  • This proposal is to allow BentoML user to provide a tarfile when building a BentoService saved bundle, which contains static content being hosted web page code, including a index.html and optionally other JS code.

  • User javascript code should be able to send prediction request to the API model server for prediction

  • This makes it possible for users to customize the web UI of their ML application for end-user to consume directly. It can be very powerful for building internal tools.

API design draft:

@env(..)
@artifacts([...])
@web_static_files("./web_ui/*")
class MyPredictionService(BentoService)
     
         @api(...)
         def predict(...)
              pass

BentoML should provide a few template frontend projects for a user to get started with building a web UI easily. e.g. a basic HTML form submitting input data, a file upload window that can be used to drag-n-drop a image or audio file, a d3 visualization that visualized the prediction result, etc

An advanced version of this should allow user to declared UI elements right from their Python code. similar to how R Shinny works.

@parano parano added the roadmap label May 29, 2020
@parano parano added help-wanted An issue currently lacks a contributor new feature and removed roadmap labels Jun 23, 2020
@Korusuke
Copy link
Contributor

Hey @parano, I would like to work on this if no one else is already working on it

@parano
Copy link
Member Author

parano commented Jun 24, 2020

Thanks, @Korusuke, let me know if you have any questions about it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-wanted An issue currently lacks a contributor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants