Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -44,14 +44,16 @@ def generate_handwriting_image_process(text_prompt, screenshot_path, return_dict
|
|
44 |
'--disable-setuid-sandbox',
|
45 |
'--disable-dev-shm-usage',
|
46 |
'--disable-gpu',
|
47 |
-
'--single-process'
|
|
|
|
|
48 |
]
|
49 |
)
|
50 |
page = await browser.newPage()
|
51 |
await page.goto('https://www.calligraphr.com/en/font/', {'waitUntil': 'networkidle2'})
|
52 |
await page.waitForSelector('#text-input')
|
53 |
await page.type('#text-input', text_prompt)
|
54 |
-
await asyncio.sleep(
|
55 |
|
56 |
# Adjust the clip values as needed to capture the proper area of the page
|
57 |
await page.screenshot({
|
|
|
44 |
'--disable-setuid-sandbox',
|
45 |
'--disable-dev-shm-usage',
|
46 |
'--disable-gpu',
|
47 |
+
'--single-process',
|
48 |
+
'--no-zygote',
|
49 |
+
'--window-size=1920,1080'
|
50 |
]
|
51 |
)
|
52 |
page = await browser.newPage()
|
53 |
await page.goto('https://www.calligraphr.com/en/font/', {'waitUntil': 'networkidle2'})
|
54 |
await page.waitForSelector('#text-input')
|
55 |
await page.type('#text-input', text_prompt)
|
56 |
+
await asyncio.sleep(3) # Increased wait time for the page to render
|
57 |
|
58 |
# Adjust the clip values as needed to capture the proper area of the page
|
59 |
await page.screenshot({
|