mistral7b_itaca / app.py
BMike10
Doc: Changes
54dfe3d
raw
history blame
431 Bytes
import random
import gradio as gr
from transformers import pipeline
def random_response(message, history):
return random.choice(["Yes", "No"])
generator = pipeline(model="michelebasilico/itaca-mistral-7b-v2-4bit")
def predict(message, history):
outputs = generator(message, num_return_sequences=4,
return_full_text=False)
return outputs
iface = gr.ChatInterface(predict)
iface.launch()