Skip to content

Instantly share code, notes, and snippets.

@NhuanTDBK
Created July 26, 2024 03:00
Show Gist options
  • Save NhuanTDBK/638df381dd631429fc03ef8133b3081b to your computer and use it in GitHub Desktop.
Save NhuanTDBK/638df381dd631429fc03ef8133b3081b to your computer and use it in GitHub Desktop.
Gradio quick preview dataframe
import gradio as gr
import pandas as pd
import random
def get_random_data():
return df.sample(10)
def display_data():
df = get_random_data()
return df.to_html(escape=False)
iface = gr.Interface(
fn=display_data,
inputs=[],
outputs="html",
title="Preview of Cleaned Data",
description="This UI displays a random selection of data frame",
)
iface.launch()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment