import gradio as gr | |
examples = [ | |
["can I carry forward annual leave?"], | |
["do I entitle to compensation leave?"], | |
["how many days of annual leave do I have?"], | |
["how to reimburse the company expenses?"], | |
["do I get paid if I got sick?"], | |
["what should I do if I got sick?"], | |
] | |
title = "Q&A Demo" | |
def inference(text): | |
return answer(text) | |
io = gr.Interface( | |
inference, | |
gr.Textbox(lines=3), | |
outputs=[ | |
gr.Textbox(lines=3, label="GPT 3.5") | |
], | |
title=title, | |
examples=examples | |
) | |
io.launch() |