testAI / app.py
KleinZxA's picture
Update app.py
870aca1 verified
raw
history blame contribute delete
524 Bytes
from transformers import pipeline, Conversation
import gradio as gr
bot = pipeline(model="openaccess-ai-collective/wizard-mega-13b")
message_list = []
response_list = []
def start(message, history):
conversation = Conversation(text=message, past_user_inputs=message_list, generated_responses=response_list)
conversation = bot(conversation)
return conversation.generated_responses[-1]
demo_chatbot = gr.ChatInterface(start, title="XzierrAI", description="Enter text to start chatting.")
demo_chatbot.launch()