Soham0708 commited on
Commit
6458ffc
·
verified ·
1 Parent(s): 034b243

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -15,7 +15,7 @@ class HtmlInput(BaseModel):
15
 
16
 
17
  async def convert_html_to_image(html, output_file, width=612, height=800, device_scale_factor=2):
18
- browser = await launch()
19
  page = await browser.newPage()
20
  await page.setViewport({'width': width, 'height': height, 'deviceScaleFactor': device_scale_factor})
21
  await page.setContent(html)
 
15
 
16
 
17
  async def convert_html_to_image(html, output_file, width=612, height=800, device_scale_factor=2):
18
+ browser = await launch(headless=True, args=['--no-sandbox', '--disable-setuid-sandbox'])
19
  page = await browser.newPage()
20
  await page.setViewport({'width': width, 'height': height, 'deviceScaleFactor': device_scale_factor})
21
  await page.setContent(html)