Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ def websearch(prompt):
|
|
34 |
headers = {
|
35 |
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
|
36 |
}
|
37 |
-
|
38 |
|
39 |
response = requests.get(url, headers=headers)
|
40 |
|
|
|
34 |
headers = {
|
35 |
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
|
36 |
}
|
37 |
+
url = f"https://www.googleapis.com/customsearch/v1?key={google_api_key}&cx={cx}&q={prompt}"
|
38 |
|
39 |
response = requests.get(url, headers=headers)
|
40 |
|