Atulit23 commited on
Commit
d1ce0d5
·
verified ·
1 Parent(s): b922c3a

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -8,12 +8,16 @@ from selenium.webdriver.chrome.service import Service
8
  import json
9
  import gradio as gr
10
  from gradio_client import Client
 
11
 
12
  def scrape_data(amazon_url):
13
  service = Service(executable_path='chromedriver')
14
  chrome_options = Options()
15
- chrome_options.add_argument("--headless")
16
- driver = webdriver.Chrome(service=service, options=chrome_options)
 
 
 
17
 
18
  driver.get(amazon_url)
19
 
 
8
  import json
9
  import gradio as gr
10
  from gradio_client import Client
11
+ import chromedriver_autoinstaller
12
 
13
  def scrape_data(amazon_url):
14
  service = Service(executable_path='chromedriver')
15
  chrome_options = Options()
16
+ chrome_options.add_argument('--no-sandbox')
17
+ chrome_options.add_argument('--disable-dev-shm-usage')
18
+
19
+ chromedriver_autoinstaller.install()
20
+ driver = webdriver.Chrome(options=chrome_options)
21
 
22
  driver.get(amazon_url)
23