import gradio as gr from transformers import pipeline qa_model = pipeline("question-answering",'a-ware/bart-squadv2') def fetch_answer(question, context ): return qa_model(question = question, context = context)['answer'] demo = gr.Interface( fn=fetch_answer, #take input as real time audio and use OPENAPI whisper for S2T #clinical note upload as file (.This is an example of simple text. or doc/docx file) inputs=[gr.Textbox(lines=2, label='Question', show_label=True, placeholder="What is age of patient ?"), gr.Textbox(lines=10, label='Clinical Note', show_label=True, placeholder="The patient is a 71 year old male...")], outputs="text", examples=[['questiontest1','context1'],['questiontest2','context2']] ) demo.launch()