import gradio as gr import wikipedia import requests from bs4 import BeautifulSoup import pyjokes def joke(): # importing installed library My_joke = pyjokes.get_joke(language="en", category="neutral") return My_joke def wiki(name): text = name text = text.split("the")[-1] text = text.split("is a")[-1] text = text.split("by")[-1] #print(wikipedia.search(text, results=20)) #print(text) out = "try this key words :\n"+str(wikipedia.search(text, results=10))+"\n\n" for i in wikipedia.search(text, results=3): try: result = wikipedia.summary(i) if " " in result.lower(): #print(result) #print() out = out + result+"\n" except: continue return out def google(name): result = {"",""} text ="" if "how to learn" in word or "steps for learning" in word or "step for learning" in word or "steps for" in word or "step for" in word: text = result = aitext(word)+"\n\n" url = "https://www.google.com/search?q="+name r = requests.get(url) soup = BeautifulSoup(r.text,"html.parser") heading_object=soup.find_all('div') for info in heading_object: if '