Skip to content

Commit 82f9a99

Browse files
authored
remove weights from image generation examples (#118)
1 parent b5089ca commit 82f9a99

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

examples/async/image_generation/run_deferred.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ async def main() -> None:
2121
result = await operation
2222
print(result)
2323

24+
# example with several messages
25+
operation = await model.run_deferred(['a red cat', 'Miyazaki style'])
26+
result = await operation
27+
print(result)
28+
2429
# run with a several messages and with saving image to file
2530
path = pathlib.Path('image.jpeg')
2631
try:
@@ -30,11 +35,6 @@ async def main() -> None:
3035
finally:
3136
path.unlink(missing_ok=True)
3237

33-
# example of several messages with a weight
34-
operation = await model.run_deferred([{'text': 'a red cat', 'weight': 5}, 'Miyazaki style'])
35-
result = await operation
36-
print(result)
37-
3838
# example of using yandexgpt and yandex-art models together
3939
gpt = sdk.models.completions('yandexgpt')
4040
messages = await gpt.run([

examples/sync/image_generation/run_deferred.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ def main() -> None:
2020
result = operation.wait()
2121
print(result)
2222

23+
# example with several messages
24+
operation = model.run_deferred(['a red cat', 'Miyazaki style'])
25+
result = operation.wait()
26+
print(result)
27+
2328
# run with a several messages and with saving image to file
2429
path = pathlib.Path('image.jpeg')
2530
try:
@@ -29,11 +34,6 @@ def main() -> None:
2934
finally:
3035
path.unlink(missing_ok=True)
3136

32-
# example of several messages with a weight
33-
operation = model.run_deferred([{'text': 'a red cat', 'weight': 5}, 'Miyazaki style'])
34-
result = operation.wait()
35-
print(result)
36-
3737
# example of using yandexgpt and yandex-art models together
3838
gpt = sdk.models.completions('yandexgpt')
3939
messages = gpt.run([

0 commit comments

Comments
 (0)