Spaces:
Runtime error
Runtime error
Commit
·
2bd6776
1
Parent(s):
4b5c5e3
update llm timing
Browse files
app.py
CHANGED
@@ -155,12 +155,13 @@ async def start_playwright(question: str):
|
|
155 |
start_t = end_t
|
156 |
# browser = await pw.webkit.launch(headless=True)
|
157 |
page = await browser.new_page()
|
158 |
-
|
159 |
-
print("New Page Done:", end_t - start_t)
|
160 |
start_t = end_t
|
161 |
# note all methods are async (use the "await" keyword)
|
162 |
await page.goto("https://basicchatbot.azurewebsites.net/")
|
163 |
# print("Title of Web: ", await page.title())
|
|
|
|
|
164 |
await page.wait_for_timeout(200)
|
165 |
# print("Content of Web: ", await page.content())
|
166 |
# print("Test content: ", await page.locator("//div[@class='css-zt5igj e1nzilvr3']").inner_html())
|
@@ -171,7 +172,7 @@ async def start_playwright(question: str):
|
|
171 |
# print("Content of Web: ", await page.content())
|
172 |
# await page.locator("//button[@class='css-1wi2cd3 e1d2x3se3']").click()
|
173 |
await page.locator("//textarea").press("Enter")
|
174 |
-
await page.wait_for_timeout(
|
175 |
# print("Content of Web: ", await page.content())
|
176 |
# print("output_text 1", await page.locator("//div[@aria-label='Chat message from assistant']").last.inner_text())
|
177 |
# output_text = await page.locator("//div[@aria-label='Chat message from assistant']").last.inner_text()
|
|
|
155 |
start_t = end_t
|
156 |
# browser = await pw.webkit.launch(headless=True)
|
157 |
page = await browser.new_page()
|
158 |
+
|
|
|
159 |
start_t = end_t
|
160 |
# note all methods are async (use the "await" keyword)
|
161 |
await page.goto("https://basicchatbot.azurewebsites.net/")
|
162 |
# print("Title of Web: ", await page.title())
|
163 |
+
end_t = time.time()
|
164 |
+
print("New Page Done:", end_t - start_t)
|
165 |
await page.wait_for_timeout(200)
|
166 |
# print("Content of Web: ", await page.content())
|
167 |
# print("Test content: ", await page.locator("//div[@class='css-zt5igj e1nzilvr3']").inner_html())
|
|
|
172 |
# print("Content of Web: ", await page.content())
|
173 |
# await page.locator("//button[@class='css-1wi2cd3 e1d2x3se3']").click()
|
174 |
await page.locator("//textarea").press("Enter")
|
175 |
+
await page.wait_for_timeout(200)
|
176 |
# print("Content of Web: ", await page.content())
|
177 |
# print("output_text 1", await page.locator("//div[@aria-label='Chat message from assistant']").last.inner_text())
|
178 |
# output_text = await page.locator("//div[@aria-label='Chat message from assistant']").last.inner_text()
|