Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,15 +20,6 @@ from xhtml2pdf import pisa
|
|
| 20 |
import chromedriver_autoinstaller
|
| 21 |
from selenium.webdriver.chrome.options import Options
|
| 22 |
|
| 23 |
-
# Selenium options
|
| 24 |
-
options = Options()
|
| 25 |
-
options.add_argument("--headless")
|
| 26 |
-
options.add_argument("--disable-gpu")
|
| 27 |
-
options.add_argument("--no-sandbox")
|
| 28 |
-
options.add_argument("--disable-dev-shm-usage")
|
| 29 |
-
options.add_argument("--window-size=1920,1080")
|
| 30 |
-
chromedriver_autoinstaller.install()
|
| 31 |
-
|
| 32 |
# Explicitly set the Chromium binary location
|
| 33 |
options.binary_location = "/usr/bin/chromium-browser"
|
| 34 |
|
|
@@ -961,13 +952,12 @@ class ReportGenerator:
|
|
| 961 |
# Ensure chromedriver is installed (it will update automatically if necessary)
|
| 962 |
chromedriver_autoinstaller.install()
|
| 963 |
|
| 964 |
-
#
|
| 965 |
options = Options()
|
| 966 |
options.add_argument("--headless")
|
| 967 |
options.add_argument("--disable-gpu")
|
| 968 |
options.add_argument("--no-sandbox")
|
| 969 |
options.add_argument("--disable-dev-shm-usage")
|
| 970 |
-
# Optionally, set window size if needed:
|
| 971 |
options.add_argument("--window-size=1920,1080")
|
| 972 |
|
| 973 |
driver = webdriver.Chrome(options=options)
|
|
|
|
| 20 |
import chromedriver_autoinstaller
|
| 21 |
from selenium.webdriver.chrome.options import Options
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
# Explicitly set the Chromium binary location
|
| 24 |
options.binary_location = "/usr/bin/chromium-browser"
|
| 25 |
|
|
|
|
| 952 |
# Ensure chromedriver is installed (it will update automatically if necessary)
|
| 953 |
chromedriver_autoinstaller.install()
|
| 954 |
|
| 955 |
+
# Selenium options
|
| 956 |
options = Options()
|
| 957 |
options.add_argument("--headless")
|
| 958 |
options.add_argument("--disable-gpu")
|
| 959 |
options.add_argument("--no-sandbox")
|
| 960 |
options.add_argument("--disable-dev-shm-usage")
|
|
|
|
| 961 |
options.add_argument("--window-size=1920,1080")
|
| 962 |
|
| 963 |
driver = webdriver.Chrome(options=options)
|