Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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)
|