Ramesh-vani commited on
Commit
819d6d8
·
verified ·
1 Parent(s): ed8c88b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -56,8 +56,9 @@ async def send_html_chunks(websocket, soup):
56
 
57
  tags = soup.find_all(True)
58
 
59
- for tag in tags:
60
- tag_content = str(tag)
 
61
  await websocket.send(json.dumps({"type": "chunk", "content": tag_content}))
62
 
63
  await websocket.send(json.dumps({"type": "end",}))
 
56
 
57
  tags = soup.find_all(True)
58
 
59
+ tags = [str(tag) for tag in soup.find_all(True)]
60
+
61
+ for tag_content in tags:
62
  await websocket.send(json.dumps({"type": "chunk", "content": tag_content}))
63
 
64
  await websocket.send(json.dumps({"type": "end",}))