Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
8aee623
1
Parent(s):
6f310ff
ok
Browse files
src/utils/segmentImage.mts
CHANGED
@@ -32,8 +32,8 @@ export async function segmentImage(
|
|
32 |
instances.push(instance)
|
33 |
|
34 |
const browser = await puppeteer.launch({
|
35 |
-
headless:
|
36 |
-
protocolTimeout:
|
37 |
})
|
38 |
|
39 |
const page = await browser.newPage()
|
@@ -60,7 +60,7 @@ export async function segmentImage(
|
|
60 |
await submitButton.click()
|
61 |
|
62 |
await page.waitForSelector('img[data-testid="detailed-image"]', {
|
63 |
-
timeout:
|
64 |
})
|
65 |
|
66 |
const maskUrl = await page.$$eval('img[data-testid="detailed-image"]', el => el.map(x => x.getAttribute("src"))[0])
|
|
|
32 |
instances.push(instance)
|
33 |
|
34 |
const browser = await puppeteer.launch({
|
35 |
+
headless: false,
|
36 |
+
protocolTimeout: 40000,
|
37 |
})
|
38 |
|
39 |
const page = await browser.newPage()
|
|
|
60 |
await submitButton.click()
|
61 |
|
62 |
await page.waitForSelector('img[data-testid="detailed-image"]', {
|
63 |
+
timeout: 40000, // we keep it tight, to fail early
|
64 |
})
|
65 |
|
66 |
const maskUrl = await page.$$eval('img[data-testid="detailed-image"]', el => el.map(x => x.getAttribute("src"))[0])
|