Browser apps
For browser-based apps (like Streamlit, Gradio, or custom HTML/JS dashboards), users interact directly through the web interface. The app URL is accessible in a browser, and users interact with the UI directly—no API calls needed from other services.
Accessing browser-based apps
To access a browser-based app:
- Deploy the app using
flyte deployorflyte serve - Navigate to the app URL in a browser
- Interact with the UI directly
Common browser-based app types
Streamlit apps
Streamlit is ideal for data dashboards and ML prototypes. See Streamlit app for details.
Gradio apps
Gradio is great for ML model demos and interactive interfaces. You can deploy a Gradio app by building a custom
AppEnvironment with the gradio package installed in your image.
Custom HTML/JS apps
You can also serve custom HTML/JS applications using FastAPI’s static file serving or any other web framework.
Best practices
- Authentication: For sensitive apps, enable authentication with
requires_auth=True. - Responsive design: Design UIs that work on various screen sizes.
- Loading states: Show loading indicators for long-running operations.
- Error handling: Display user-friendly error messages.
- Resource management: Configure appropriate CPU/memory resources based on expected usage.