Spaces:
Runtime error
Runtime error
test
Browse files
app.py
CHANGED
@@ -60,8 +60,9 @@ def update_queue_status(message):
|
|
60 |
|
61 |
def process_task(task):
|
62 |
try:
|
63 |
-
|
64 |
-
|
|
|
65 |
task.is_processing = True
|
66 |
# ファイルデータをPIL Imageに変換
|
67 |
image = Image.open(io.BytesIO(task.file_data))
|
@@ -82,7 +83,7 @@ def process_task(task):
|
|
82 |
'task_id': task.task_id,
|
83 |
'sotai_image': sotai_image,
|
84 |
'sketch_image': sketch_image
|
85 |
-
})
|
86 |
except Exception as e:
|
87 |
print(f"Task error: {str(e)}")
|
88 |
if not task.cancel_flag:
|
|
|
60 |
|
61 |
def process_task(task):
|
62 |
try:
|
63 |
+
update_queue_status("sid")
|
64 |
+
update_queue_status(str("sid" in session))
|
65 |
+
client_id = session.get("sid")
|
66 |
task.is_processing = True
|
67 |
# ファイルデータをPIL Imageに変換
|
68 |
image = Image.open(io.BytesIO(task.file_data))
|
|
|
83 |
'task_id': task.task_id,
|
84 |
'sotai_image': sotai_image,
|
85 |
'sketch_image': sketch_image
|
86 |
+
}, to=client_id)
|
87 |
except Exception as e:
|
88 |
print(f"Task error: {str(e)}")
|
89 |
if not task.cancel_flag:
|