sdk | sdk_version | app_file | pinned |
---|---|---|---|
gradio |
3.50.2 |
app.py |
false |
pygwalker-gradio
pygwalker
App 1: Visual Exploration of AirBnB Listings in NYC usingpygwalker is a Python library that turns your dataframe/data connection into an interactive visualization module that allows you to analysis the data with drag-and-drop/chat interface, like tableau/powerBI.
Play a live demo on hugging face spaces: play pygwalker
Run the app
python app.py
Native Support for Gradio Integration
What is the native way to integrate pygwalker with gradio. pygwalker contains a feature called 'kernel computation', which runs a computation engine based on duckDB to handle the data queries from user's interaction.
This is a powerful feature but requires extra setup from pygwalker. Since pygwalker>=0.3.10a2
, pygwalker provide a native support for gradio developers to enable this feature:
import gradio as gr
import pandas as pd
from pygwalker.api.gradio import PYGWALKER_ROUTE, get_html_on_gradio
with gr.Blocks() as demo:
df = pd.read_csv("xxx.csv")
# use get_html_on_gradio, which contains the logic to enable kernel computation
pyg_html = get_html_on_gradio(df, spec="gw.json", debug=True)
gr.HTML(pyg_html)
app = demo.launch(app_kwargs={
"routes": [PYGWALKER_ROUTE]
})
- app.py pygwalker's kernel computation in gradio
- [app_lite.py] basic example, without kernel computation