dsfd-assignment-3/witches-exploration
0
1import pandas as pd2import numpy as np3 4import gradio as gr5import pygwalker as pyg6 7 8from pygwalker.api.gradio import PYGWALKER_ROUTE, get_html_on_gradio9 10 11from data import df12from network import analysis13 14 15with gr.Blocks(theme=gr.themes.Monochrome()) as demo:16 # with gr.Tab("๐ About"):17 # # gr.Markdown(ABOUT_TEXT)18 19 with gr.Row():20 with gr.Column():21 gr.Label("๐ช Visualize witches family connections", show_label=False)22 gr.Markdown("You can see the various parent-child-sibling-spouse relationships of the accused witches!")23 gr.HTML(analysis)24 25 with gr.Row():26 with gr.Column():27 gr.Label("๐ Visually explore witches family data", show_label=False)28 gr.Markdown("You can use drag-and-drop operations to explore the data, start your analysis now! In the given query, we see where the accused witches reside after filtering on the gender label (here, Female) and we show a breakdown of the class!")29 pyg_app = get_html_on_gradio(df, spec="./config.json")30 gr.HTML(pyg_app)31 32demo.launch(app_kwargs={"routes": [PYGWALKER_ROUTE]}, share=True).queue()33 