Spaces:
No application file
No application file
import pandas as pd | |
import gradio as gr | |
from app.backend.data_engine import DataEngine | |
class DataFrameComponent: | |
def __init__(self, data_engine: DataEngine): | |
self.data_engine = data_engine | |
def show(self, df=None): | |
with gr.Row(): | |
# Create DataFrame display area | |
if df is None: | |
df = self.data_engine.init_dataframe() | |
print(df) | |
df_display = gr.DataFrame(df, col_count=(len(df.columns), 'fixed')) | |
return df_display | |