Flaretext2text / app.py
HaveAI's picture
Update app.py
7429dea verified
raw
history blame
293 Bytes
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()