import gradio as gr def fn(input=""): df = pd.DataFrame(data={'x': [1, 2], 'y': [3, 4], "cos": [0.1, 0.5]}) return df, df.to_html() iface = gr.Interface( fn, "text", ["dataframe", "html"], title="Test dataframe and html", description="Test dataframe and html", # layout="vertical", ) iface.launch(share=False, debug=True) # iface.launch()