| import gradio as gr | |
| from nomic.gpt4all import GPT4All | |
| m = GPT4All() | |
| m.open() | |
| def chat(input): | |
| return m.prompt(input) | |
| demo=gr.Interface(fn=chat, | |
| inputs="text", | |
| outputs="text", | |
| examples=[['write me a story about a lonely computer']], | |
| title="GPT4ALL", | |
| description="Check https://github.com/nomic-ai/gpt4all" | |
| ) | |
| demo.launch() |