import gradio as gr from transformers import pipeline # Load a free LLM chatbot = pipeline("text-generation", model="mistralai/Mistral-7B-Instruct-v0.1") def chat(message): response = chatbot(message, max_length=200)[0]["generated_text"] return response # Gradio Web Interface demo = gr.Interface(fn=chat, inputs="text", outputs="text") demo.launch()