chatcode / app.py
Arafath10's picture
Update app.py
ba0001a
raw
history blame
445 Bytes
import gradio as gr
from chatterbot import ChatBot
from chatterbot.trainers import ListTrainer
from chatterbot.trainers import ChatterBotCorpusTrainer
import wikipedia
def greet(name):
#text = chatbot.get_response(name)
if "what" in name:
result = wikipedia.summary(name, sentences =10)
return result
else:
return "no found"
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch()