From 9e80602082154717c92305436e791c3b264625a9 Mon Sep 17 00:00:00 2001 From: JacobSingh Date: Sat, 9 Sep 2023 15:08:38 +0530 Subject: [PATCH] Added module to autoupgrade and select the proper Chromedriver version --- actions/web_scrape.py | 2 ++ requirements.txt | 1 + 2 files changed, 3 insertions(+) diff --git a/actions/web_scrape.py b/actions/web_scrape.py index 06d8eadf5..3939bfb31 100644 --- a/actions/web_scrape.py +++ b/actions/web_scrape.py @@ -19,6 +19,7 @@ from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.wait import WebDriverWait from fastapi import WebSocket +import chromedriver_autoinstaller import processing.text as summary @@ -31,6 +32,7 @@ FILE_DIR = Path(__file__).parent.parent CFG = Config() +chromedriver_autoinstaller.install() #Installs the latest compat version of chromedriver async def async_browse(url: str, question: str, websocket: WebSocket) -> str: diff --git a/requirements.txt b/requirements.txt index 025c025a9..c30785495 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,3 +17,4 @@ fastapi python-multipart markdown langchain==0.0.275 +chromedriver-autoinstaller