File size: 445 Bytes
e641e34 f48d575 6a397bd 92ad35f f3af7d2 cd7f54a e641e34 ba0001a 92ad35f ba0001a 92ad35f ce2e0b4 ba0001a e641e34 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
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() |