We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80b28fc commit a5c02d4Copy full SHA for a5c02d4
examples/run_async.py
@@ -2,7 +2,7 @@
2
3
from replicate import AsyncReplicate
4
5
-client = AsyncReplicate()
+replicate = AsyncReplicate()
6
7
# https://replicate.com/stability-ai/sdxl
8
model_version = "stability-ai/sdxl:39ed52f2a78e934b3ba6e2a89f5b1c712de7dfea535525255b1aa35c5565e08b"
@@ -11,7 +11,7 @@
11
12
async def main() -> None:
13
# Create tasks with asyncio.gather directly
14
- tasks = [client.run(model_version, input={"prompt": prompt}) for prompt in prompts]
+ tasks = [replicate.run(model_version, input={"prompt": prompt}) for prompt in prompts]
15
16
results = await asyncio.gather(*tasks)
17
print(results)
0 commit comments