import gradio as gr from nomic.gpt4all import GPT4All def greet(name): m = GPT4All() m.open() ans = m.prompt(name) return ans iface = gr.Interface(fn=greet, inputs="text", outputs="text") iface.launch()