import gradio as gr def mental_chat(message, history): return givetext(patienttext,newmodel,newtokenizer) demo = gr.ChatInterface(mental_chat) demo.launch()