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

feat: add communication on gradio(pre-demo) #289

Merged
merged 2 commits into from
Oct 29, 2023

Conversation

longxiaofei
Copy link
Member

@longxiaofei longxiaofei commented Oct 29, 2023

support pygwalker use duckdb in gradio.

Just a pre-release demo version, Communication won't work when gradio is reloaded (to be fixed).

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")
    pyg_html = get_html_on_gradio(df, spec="gw_config.json", debug=True)
    gr.HTML(pyg_html)


app = demo.launch(app_kwargs={
    "routes": [PYGWALKER_ROUTE]
})

@longxiaofei longxiaofei merged commit e1699fe into Kanaries:main Oct 29, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant