File size: 1,747 Bytes
291e480
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import asyncio
import fal_client
from dotenv import load_dotenv
import os

load_dotenv()

os.environ["FAL_KEY"] = os.getenv("FAL_API_KEY")

async def subscribe():
    handler = await fal_client.submit_async(
        "comfy/LVE/fal-favourite",
        arguments={
            "loadimage_1": "https://v3.fal.media/files/tiger/jn66x0N2Xu_zxX8_GKXP7_A4%20-%202.png",
            "loadimage_2": "https://fal.media/files/elephant/UX-Etn4FZUSbUqxLKihR1.png",
            "loadimage_3": "https://fal.media/files/lion/CjubwDK_JC9TSy6E_Ck2O.png",
            "loadimage_4": "https://fal.media/files/koala/4-4xrKSOZFxInqt0r-clj.png",
            "loadimage_5": "https://fal.media/files/koala/xz9aEtyqSb9jhLIgvZfdr.png",
            "loadimage_6": "https://fal.media/files/monkey/6703hkTCUCzXo7d43E4mQ.png",
            "loadimage_7": "https://fal.media/files/zebra/c3lO_fvrSreL3ebz2xfFA.png",
            "loadimage_8": "https://fal.media/files/lion/UgFgxIjafvBFlu78Pj8ZP.png",
            "loadimage_9": "https://fal.media/files/monkey/UQqjW4UU1-FJLiTd8l_QH.png",
            "loadimage_10": "https://fal.media/files/monkey/mGciMw0tNFVyLKEUrapWO.png",
            "title": "our favourite things",
            "text_1-1": "cat",
            "text_1-2": "motorcycle",
            "text_1-3": "cocktail",
            "text_2-1": "book",
            "text_2-2": "money",
            "text_2-3": "mountain",
            "text_3-1": "computer",
            "text_3-2": "console",
            "text_3-3": "rose",
            "couple_name": "ELLS & MILLS"
        },
    )

    async for event in handler.iter_events(with_logs=True):
        print(event)

    result = await handler.get()

    print(result)


if __name__ == "__main__":
    asyncio.run(subscribe())