Spaces:
Sleeping
Sleeping
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() | |