from src.inference import infer import gradio as gr def main(): description = "A simple way to understand and talk to your data!" iface = gr.Interface(fn=infer, inputs=[gr.Textbox(label="Query"), gr.File(label="CSV file")], outputs=[gr.JSON(label="Result"), gr.Dataframe(label="Data")], examples=[ ["Who scored the highest?", "sample.csv"], ], title="Talk to your Data!", description=description, allow_flagging='never') iface.launch() if __name__ == "__main__": main()