mgokg commited on
Commit
207c170
·
verified ·
1 Parent(s): de84541

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -37,7 +37,7 @@ 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
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}"
 
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}"