File size: 762 Bytes
6abee0e
 
 
 
 
6f44e10
6abee0e
 
 
 
 
 
 
 
 
 
 
 
d5436c7
6abee0e
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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()