Skip to content

Commit

Permalink
Remove keys
Browse files Browse the repository at this point in the history
  • Loading branch information
AsiaCao committed Mar 22, 2024
1 parent 11288ae commit 37f0e75
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions vision_agent/tools/tools.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import logging
import os
import tempfile
from abc import ABC
from collections import Counter as CounterClass
from pathlib import Path
from typing import Any, Dict, List, Tuple, Union, cast
from collections import Counter as CounterClass

import numpy as np
import requests
Expand Down Expand Up @@ -343,9 +344,12 @@ def __call__(self, image: Union[str, Path]) -> List[str]:
assert isinstance(image, str), "The input image must be a string url."
image = "https://popmenucloud.com/cdn-cgi/image/width%3D1920%2Cheight%3D1920%2Cfit%3Dscale-down%2Cformat%3Dauto%2Cquality%3D60/vpylarnm/a6ad1671-8938-457f-b4cd-3215caa122cb.png"
url = "https://www.googleapis.com/customsearch/v1"
api_key = os.getenv("GOOGLE_API_KEY")
search_engine_id = os.getenv("GOOGLE_SEARCH_ENGINE_ID")
assert api_key and search_engine_id, "Please set the GOOGLE_API_KEY and GOOGLE_SEARCH_ENGINE_ID environment variable. See https://developers.google.com/custom-search/v1/using_rest for more information."
params = {
"key": "AIzaSyDy3UMHL1E3nFLTLdIQb3nyIU5-zhSfzPo",
"cx": "831f248aa2e1d4daf",
"key": api_key,
"cx": search_engine_id,
"q": image,
"num": 10,
"searchType":"image",
Expand Down

0 comments on commit 37f0e75

Please sign in to comment.