Spaces:
Runtime error
Runtime error
import gradio as gr | |
from transformers import pipeline | |
pipe = pipeline("text-generation","TheBloke/Mistral-7B-Instruct-v0.1-GGUF") | |
def chat_fn(message, history): | |
response = pipe(message, max_new_tokens=200)[0]["generated_text"] | |
return response | |
gr.ChatInterface(fn=chat_fn).launch() | |