Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -37,12 +37,11 @@ def websearch(prompt):
|
|
37 |
# URL der Google Custom Search API
|
38 |
url = f"https://www.googleapis.com/customsearch/v1?key={google_api_key}&cx={cx}&q={prompt}"
|
39 |
response = requests.get(url, headers=headers)
|
40 |
-
return response.json()
|
41 |
soup = BeautifulSoup(response.content, 'html.parser')
|
42 |
response_text = soup.find('body')
|
43 |
#prompt = f"{search_term}\n use this result from a google search to answer the question \n {response_text.text}"
|
44 |
#result = predict(prompt)
|
45 |
-
return response_text
|
46 |
|
47 |
|
48 |
|
|
|
37 |
# URL der Google Custom Search API
|
38 |
url = f"https://www.googleapis.com/customsearch/v1?key={google_api_key}&cx={cx}&q={prompt}"
|
39 |
response = requests.get(url, headers=headers)
|
|
|
40 |
soup = BeautifulSoup(response.content, 'html.parser')
|
41 |
response_text = soup.find('body')
|
42 |
#prompt = f"{search_term}\n use this result from a google search to answer the question \n {response_text.text}"
|
43 |
#result = predict(prompt)
|
44 |
+
return response_text
|
45 |
|
46 |
|
47 |
|