Spaces:
Paused
Paused
Upload folder using huggingface_hub
Browse files
run.py
CHANGED
|
@@ -14,6 +14,7 @@ from selenium.webdriver.common.action_chains import ActionChains
|
|
| 14 |
|
| 15 |
from prompts import SYSTEM_PROMPT, SYSTEM_PROMPT_TEXT_ONLY
|
| 16 |
from openai import OpenAI
|
|
|
|
| 17 |
from utils import get_web_element_rect, encode_image, extract_information, print_message,\
|
| 18 |
get_webarena_accessibility_tree, get_pdf_retrieval_ans_from_assistant, clip_message_and_obs, clip_message_and_obs_text_only
|
| 19 |
|
|
@@ -241,7 +242,7 @@ def exec_action_scroll(info, web_eles, driver_task, args, obs_info):
|
|
| 241 |
|
| 242 |
def webvoyager_run(args, task, task_dir):
|
| 243 |
# OpenAI client
|
| 244 |
-
client = OpenAI(api_key=args.api_key)
|
| 245 |
options = driver_config(args)
|
| 246 |
setup_logger(task_dir)
|
| 247 |
logging.info(f'########## TASK{task["id"]} ##########')
|
|
|
|
| 14 |
|
| 15 |
from prompts import SYSTEM_PROMPT, SYSTEM_PROMPT_TEXT_ONLY
|
| 16 |
from openai import OpenAI
|
| 17 |
+
import httpx
|
| 18 |
from utils import get_web_element_rect, encode_image, extract_information, print_message,\
|
| 19 |
get_webarena_accessibility_tree, get_pdf_retrieval_ans_from_assistant, clip_message_and_obs, clip_message_and_obs_text_only
|
| 20 |
|
|
|
|
| 242 |
|
| 243 |
def webvoyager_run(args, task, task_dir):
|
| 244 |
# OpenAI client
|
| 245 |
+
client = OpenAI(api_key=args.api_key, http_client=httpx.Client(proxies=""))
|
| 246 |
options = driver_config(args)
|
| 247 |
setup_logger(task_dir)
|
| 248 |
logging.info(f'########## TASK{task["id"]} ##########')
|