File size: 635 Bytes
781f127
 
 
 
 
 
 
 
 
 
 
 
286c059
 
781f127
 
 
 
 
 
 
 
 
 
 
 
324150b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# -*- coding: utf-8 -*-
"""
Created on Sat Oct  5 16:41:22 2024

@author: Admin
"""

import gradio as gr
from transformers import pipeline


#chatbot = pipeline(model="NCSOFT/Llama-3-OffsetBias-8B")
#chatbot = pipeline(model="TheBloke/Mistral-7B-Instruct-v0.2-GPTQ")
chatbot = pipeline(model="facebook/blenderbot-400M-distill")

message_list = []
response_list = []


def vanilla_chatbot(message, history):
    conversation = chatbot(message)
    
    return conversation[0]['generated_text']

demo_chatbot = gr.ChatInterface(vanilla_chatbot, title="Vanilla Chatbot", description="Enter text to start chatting.")

demo_chatbot.launch()