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) name = name.lower() if "what" in name or "who" in name or "how to" 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()