Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import threading
|
|
5 |
|
6 |
async def send_wss_request():
|
7 |
uri = "wss://clone3-imagex-clone-advance.hf.space/queue/join"
|
8 |
-
uri2 = "wss://clone3-
|
9 |
|
10 |
while True:
|
11 |
try:
|
@@ -41,7 +41,7 @@ async def send_wss_request():
|
|
41 |
print(f"Received: {response}")
|
42 |
|
43 |
# Send a message
|
44 |
-
message = '{"fn_index":
|
45 |
await websocket.send(message)
|
46 |
print(f"Sent: {message}")
|
47 |
|
@@ -53,7 +53,7 @@ async def send_wss_request():
|
|
53 |
response = await websocket.recv()
|
54 |
print(f"Received: {response}")
|
55 |
|
56 |
-
message='{"data":["
|
57 |
await websocket.send(message)
|
58 |
print(f"Sent: {message}")
|
59 |
|
@@ -65,7 +65,7 @@ async def send_wss_request():
|
|
65 |
print("Connection closed. Reconnecting in 30 minutes.")
|
66 |
|
67 |
# Sleep for 30 minutes before the next iteration
|
68 |
-
await asyncio.sleep(
|
69 |
|
70 |
def run_websocket():
|
71 |
# Create a new event loop for the thread
|
|
|
5 |
|
6 |
async def send_wss_request():
|
7 |
uri = "wss://clone3-imagex-clone-advance.hf.space/queue/join"
|
8 |
+
uri2 = "wss://clone3-websoketsend.hf.space/queue/join"
|
9 |
|
10 |
while True:
|
11 |
try:
|
|
|
41 |
print(f"Received: {response}")
|
42 |
|
43 |
# Send a message
|
44 |
+
message = '{"fn_index":0,"session_hash":"kb46puzhzr"}'
|
45 |
await websocket.send(message)
|
46 |
print(f"Sent: {message}")
|
47 |
|
|
|
53 |
response = await websocket.recv()
|
54 |
print(f"Received: {response}")
|
55 |
|
56 |
+
message='{"data":["spider"],"event_data":null,"fn_index":0,"session_hash":"kb46puzhzr"}'
|
57 |
await websocket.send(message)
|
58 |
print(f"Sent: {message}")
|
59 |
|
|
|
65 |
print("Connection closed. Reconnecting in 30 minutes.")
|
66 |
|
67 |
# Sleep for 30 minutes before the next iteration
|
68 |
+
await asyncio.sleep(30 * 60)
|
69 |
|
70 |
def run_websocket():
|
71 |
# Create a new event loop for the thread
|