An open API service indexing awesome lists of open source software.

https://github.com/observedobserver/pygwalker-gradio

build data apps with pygwalker and gradio
https://github.com/observedobserver/pygwalker-gradio

Last synced: 10 months ago
JSON representation

build data apps with pygwalker and gradio

Awesome Lists containing this project

README

          

---
sdk: gradio
sdk_version: 3.50.2
app_file: app.py
pinned: false
---

# pygwalker-gradio

## App 1: Visual Exploration of AirBnB Listings in NYC using [pygwalker](https://github.com/Kanaries/pygwalker)
> [pygwalker]() 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](https://huggingface.co/spaces/observedobserver/pygwalker-gradio)

Run the app

```bash
python app.py
```

pygwalker-dradio

## 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:

```python
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](./app.py) pygwalker's kernel computation in gradio
+ [app_lite.py] basic example, without kernel computation