chatcode / app.py
Arafath10's picture
Update app.py
5b6bdce
raw
history blame
449 Bytes
import gradio as gr
from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer
from chatterbot.trainers import ChatterBotCorpusTrainer
chatbot = ChatBot("Chatpot")
trainer = ChatterBotCorpusTrainer(chatbot)
trainer.train(
"chatterbot.corpus.english"
)
def greet(name):
text = chatbot.get_response(name)
return "Hello " + str(text) + "!!"
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch()