Skip to content

Python Quick Web UIs

Posted on:March 16, 2024

A list of libraries to build quick Web UI with python

Gradio

Gradio is the fastest way to demo your machine learning model with a friendly web interface so that anyone can use it, anywhere.

Pasted image 20240316213331.png

Machine Learning Oriented, Hugging Face integration

https://www.gradio.app

Fastapi

import gradio as gr

def greet(name):
    return "Hello " + name + "!"

demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch()

Gradio Playground https://www.gradio.app/playground

Hosting Hugging Face Spaces or self hosted

Hyperdiv

Open-source framework for rapidly building reactive web UIs in Python, with built-in Shoelace components, Markdown, charts, tables, and more.

pip install hyperdiv
hyperdiv docs

https://hyperdiv.io

deploy to https://replit.com https://railway.app https://fly.io

Streamlit

Streamlit is an open-source Python library that provides development components to create and share beautiful and easy to use custom web applications for machine learning and data science. Streamlit is a data app framework that can also be used as a data dashboarding tool. Using just a few lines of code, one can build and deploy powerful data apps in a matter of a few minutes.

Pasted image 20240316154825.png

Plotly Dash

Pasted image 20240316154911.png

Dash

Plotly Dash User Guide & Documentation

Evidence

Preview Image

Business intelligence as code: build fast, interactive data visualizations in pure SQL and markdown - evidence-dev/evidence

Perspective

Pasted image 20240317223642.png

PySimpleGUI

PySimpleGUI creates graphical user interfaces (GUIs) using Python, quickly and easily!

https://www.pysimplegui.com

  1. Make sure Python is installed.

  2. Install PySimpleGUI: python3 -m pip install pysimplegui

  3. Download main.py, which contains:

import PySimpleGUI as sg

# All the stuff inside your window.
layout = [  [sg.Text("What's your name?")],
			[sg.InputText()],
			[sg.Button('Ok'), sg.Button('Cancel')] ]

# Create the Window
window = sg.Window('Hello Example', layout)

# Event Loop to process "events" and get the "values" of the inputs
while True:
	event, values = window.read()

	# if user closes window or clicks cancel
	if event == sg.WIN_CLOSED or event == 'Cancel':
		break

print('Hello', values[0], '!')
window.close()
  1. Run:
pyhon3 main.py

Reflex

Preview Image

πŸ•ΈοΈ Web apps in pure Python 🐍. Contribute to reflex-dev/reflex development by creating an account on GitHub.

Other frameworks:

Preview Image

No-code in the front, Python in the back. An open-source framework for creating data apps. - streamsync-cloud/streamsync

Streamsync is an open-source framework for creating data apps. Build user interfaces using a visual editor; write the backend code in Python.

GUI

Kivy

Preview Image

Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS - kivy/kivy

Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS

Data Oriented / Dashboards

Panel

Pasted image 20240317211633.png

Voila / Voici

Bokeh

Preview Image

Bokeh is a Python library for creating interactive visualizations for modern web browsers. It helps you build beautiful graphics, ranging from simple plots to complex dashboards with streaming data...

Binder

Preview Image

Reproducible, sharable, open, interactive computing environments.

Deployment

Preview Image

Ploomber: Ship AI applications

Preview Image

Streamlit is an open-source Python framework for machine learning and data science teams. Create interactive data apps in minutes.

Observable

Quatro

Preview Image

An open source technical publishing system for creating beautiful articles, websites, blogs, books, slides, and more. Supports Python, R, Julia, and JavaScript.

PyGWalker

Preview Image

PyGWalker: Turn your pandas dataframe into an interactive UI for visual analysis - Kanaries/pygwalker