Spaces:
Runtime error
Runtime error
Update async handler
Browse files- index.html +6 -6
index.html
CHANGED
@@ -184,19 +184,19 @@ async def setup_func():
|
|
184 |
async def message_func(event):
|
185 |
if event.data[0]=="click":
|
186 |
if event.data[1]=="export":
|
187 |
-
export_func(event)
|
188 |
elif event.data[1]=="commit":
|
189 |
-
commit_func(event)
|
190 |
elif event.data[1]=="undo":
|
191 |
-
undo_func(event)
|
192 |
elif event.data[0]=="upload":
|
193 |
-
upload_func(event)
|
194 |
elif event.data[0]=="outpaint":
|
195 |
-
outpaint_func(event)
|
196 |
elif event.data[0]=="mode":
|
197 |
document.querySelector("#mode").value=event.data[1]
|
198 |
elif event.data[0]=="transfer":
|
199 |
-
transfer_func(event)
|
200 |
|
201 |
window.addEventListener("message",create_proxy(message_func))
|
202 |
import asyncio
|
|
|
184 |
async def message_func(event):
|
185 |
if event.data[0]=="click":
|
186 |
if event.data[1]=="export":
|
187 |
+
await export_func(event)
|
188 |
elif event.data[1]=="commit":
|
189 |
+
await commit_func(event)
|
190 |
elif event.data[1]=="undo":
|
191 |
+
await undo_func(event)
|
192 |
elif event.data[0]=="upload":
|
193 |
+
await upload_func(event)
|
194 |
elif event.data[0]=="outpaint":
|
195 |
+
await outpaint_func(event)
|
196 |
elif event.data[0]=="mode":
|
197 |
document.querySelector("#mode").value=event.data[1]
|
198 |
elif event.data[0]=="transfer":
|
199 |
+
await transfer_func(event)
|
200 |
|
201 |
window.addEventListener("message",create_proxy(message_func))
|
202 |
import asyncio
|