diff --git a/examples/background-removal.py b/examples/background-removal.py deleted file mode 100755 index be66681..0000000 --- a/examples/background-removal.py +++ /dev/null @@ -1,27 +0,0 @@ -import os -import json - -api_key = os.environ.get("SUBSTRATE_API_KEY") -if api_key is None: - raise EnvironmentError("No SUBSTRATE_API_KEY set") - -from substrate import ( - Substrate, - EraseImage, - InpaintImage, - GenerateImage, - RemoveBackground, -) - -substrate = Substrate(api_key=api_key, timeout=60 * 5) -prompt = "by edward hopper, a red leather wing chair in an open room, pillars, amazing painting composition" -image = GenerateImage(prompt=prompt, store="hosted") -mask = RemoveBackground(image_uri=image.future.image_uri, return_mask=True, store="hosted") -bg = EraseImage(image_uri=image.future.image_uri, mask_image_uri=mask.future.image_uri, store="hosted") -bg_prompt = "by edward hopper, an empty room with pillars, amazing painting composition" -inpaint = InpaintImage(image_uri=bg.future.image_uri, prompt=bg_prompt, store="hosted") -result = substrate.run(inpaint) -viz = Substrate.visualize(inpaint) -os.system(f"open {viz}") - -print(json.dumps(result.json, indent=2)) diff --git a/examples/basic.py b/examples/basic.py deleted file mode 100755 index 1090c1f..0000000 --- a/examples/basic.py +++ /dev/null @@ -1,35 +0,0 @@ -import os -import sys -from pathlib import Path - -# add parent dir to sys.path to make 'substrate' importable -parent_dir = Path(__file__).resolve().parent.parent -sys.path.insert(0, str(parent_dir)) - -api_key = os.environ.get("SUBSTRATE_API_KEY") -if api_key is None: - raise EnvironmentError("No SUBSTRATE_API_KEY set") - -from substrate import Secrets, Substrate, ComputeText, sb - -substrate = Substrate( - api_key=api_key, - secrets=Secrets(openai="YOUR_OPENAI_KEY", anthropic="YOUR_ANTHROPIC_KEY"), -) - -story = ComputeText(prompt="tell me a story") -summary = ComputeText(prompt=sb.format(f"Summarize this story: {story}", story=story.future.text)) - -response = substrate.run(story, summary) -print(response) - -print("=== story") -story_out = response.get(story) -print(story_out.text) - -print("=== summary") -summary_out = response.get(summary) -print(summary_out.text) - -# viz = Substrate.visualize(ry) -# print(viz) diff --git a/examples/basic_embedding.py b/examples/basic_embedding.py deleted file mode 100755 index 69e189f..0000000 --- a/examples/basic_embedding.py +++ /dev/null @@ -1,50 +0,0 @@ -import os -import sys -import json -from pathlib import Path - -import requests - -response = requests.get("https://www.substrate.run/openapi.json") -openapi_spec = response.json() -openapi_version = openapi_spec["openapi"] -api_components = openapi_spec["components"]["schemas"] -api_nodes = openapi_spec["paths"] -cleaned_nodes = {key.replace("/", ""): value for key, value in api_nodes.items()} - -# add parent dir to sys.path to make 'substrate' importable -parent_dir = Path(__file__).resolve().parent.parent -sys.path.insert(0, str(parent_dir)) - -api_key = os.environ.get("SUBSTRATE_API_KEY") -if api_key is None: - raise EnvironmentError("No SUBSTRATE_API_KEY set") - -from substrate import Substrate, MultiEmbedText, DeleteVectorStore, FindOrCreateVectorStore - -substrate = Substrate(api_key=api_key, timeout=60 * 5) - -old_collection = DeleteVectorStore(collection_name="substrate_api_v2", model="jina-v2") - -collection = FindOrCreateVectorStore( - collection_name=old_collection.future.collection_name, - model=old_collection.future.model, -) - -components_embeddings = MultiEmbedText( - collection_name=collection.future.collection_name, - items=[ - {"doc_id": name, "text": json.dumps(component), "metadata": {"type": "component"}} - for name, component in api_components.items() - ], -) - -nodes_embeddings = MultiEmbedText( - collection_name=collection.future.collection_name, - items=[ - {"doc_id": node_name, "text": json.dumps(node), "metadata": {"type": "node"}} - for node_name, node in cleaned_nodes.items() - ], -) - -res = substrate.run(collection, components_embeddings, nodes_embeddings) diff --git a/examples/basic_rag.py b/examples/basic_rag.py deleted file mode 100644 index 4bb777c..0000000 --- a/examples/basic_rag.py +++ /dev/null @@ -1,60 +0,0 @@ -import os -import sys -from pathlib import Path - -from substrate.nodes import ComputeText - -# add parent dir to sys.path to make 'substrate' importable -parent_dir = Path(__file__).resolve().parent.parent -sys.path.insert(0, str(parent_dir)) - -api_key = os.environ.get("SUBSTRATE_API_KEY") -if api_key is None: - raise EnvironmentError("No SUBSTRATE_API_KEY set") - -from substrate import Substrate, QueryVectorStore, FindOrCreateVectorStore, sb - -substrate = Substrate(api_key=api_key, timeout=60 * 5) - -prompt_text = input("Enter a prompt: ") - -collection = FindOrCreateVectorStore(collection_name="substrate_api_v2", model="jina-v2") - -relevant_node = QueryVectorStore( - collection_name=collection.future.collection_name, - model=collection.future.model, - query_strings=[prompt_text], - top_k=1, - include_metadata=True, - include_values=True, - filters={"type": {"$eq": "node"}}, -) - -relevant_components = QueryVectorStore( - collection_name=collection.future.collection_name, - model=collection.future.model, - top_k=5, - query_vectors=[sb.jq(relevant_node.future.results, ".[0].[0].vector")], - include_metadata=True, - filters={"type": {"$eq": "component"}}, -) - -generated_text = ComputeText( - prompt=sb.concat( - """ -You are a helpful AI assistant. A user is going to ask you a question about -an AI platform called Substrate. Please use the following information to summarize -the key points about Substrate. The user is looking for a high-level overview of the -following resource: - """, - sb.concat(sb.jq(relevant_node.future.results, ".[0].[0].metadata.doc")), - "The user's question is:", - prompt_text, - ) -) - -res = substrate.stream(generated_text) -with open(sys.stdout.fileno(), "w") as stdout: - for item in res.iter(): - if item.data["object"] == "node.delta": - stdout.write(item.data.get("data", {}).get("text", "")) diff --git a/examples/basics/README.md b/examples/basics/README.md new file mode 100644 index 0000000..0f8e929 --- /dev/null +++ b/examples/basics/README.md @@ -0,0 +1 @@ +# Basic examples diff --git a/examples/explicit_edges.py b/examples/explicit_edges.py deleted file mode 100755 index d948a95..0000000 --- a/examples/explicit_edges.py +++ /dev/null @@ -1,34 +0,0 @@ -import os -import sys -from pathlib import Path - -# add parent dir to sys.path to make 'substrate' importable -parent_dir = Path(__file__).resolve().parent.parent -sys.path.insert(0, str(parent_dir)) - -api_key = os.environ.get("SUBSTRATE_API_KEY") -if api_key is None: - raise EnvironmentError("No SUBSTRATE_API_KEY set") - -from substrate import RunPython, Substrate - -substrate = Substrate(api_key=api_key, timeout=60 * 5) - - -def print_time(): - import time - - return time.time() - - -a = RunPython(function=print_time) -a.id = "a" - -b = RunPython(function=print_time, _depends=[a]) -b.id = "b" - -c = RunPython(function=print_time, _depends=[a, b]) -c.id = "c" - -res = substrate.run(a, b, c) -print(res.json) diff --git a/examples/intro.py b/examples/intro.py deleted file mode 100755 index 345e809..0000000 --- a/examples/intro.py +++ /dev/null @@ -1,28 +0,0 @@ -import os -import sys -import json -from pathlib import Path - -# add parent dir to sys.path to make 'substrate' importable -parent_dir = Path(__file__).resolve().parent.parent -sys.path.insert(0, str(parent_dir)) - -api_key = os.environ.get("SUBSTRATE_API_KEY") -if api_key is None: - raise EnvironmentError("No SUBSTRATE_API_KEY set") - -from substrate import Substrate, ComputeText, GenerateImage, sb - -substrate = Substrate(api_key=api_key, timeout=60 * 5) - -scene = ComputeText(prompt="description of a mythical forest creature: ") - -styles = ["woodblock printed", "art nouveau poster"] -images = [GenerateImage(store="hosted", prompt=sb.concat(style, ": ", scene.future.text)) for style in styles] - -result = substrate.run(*images) - -print(json.dumps(result.json, indent=2)) - -viz = Substrate.visualize(*images) -os.system(f"open {viz}") diff --git a/examples/media_pipe.py b/examples/media_pipe.py deleted file mode 100755 index 9a17d62..0000000 --- a/examples/media_pipe.py +++ /dev/null @@ -1,27 +0,0 @@ -import os -import json - -from substrate import Substrate, Firellava13B, GenerateImage, sb - -api_key = os.environ.get("SUBSTRATE_API_KEY") -substrate = Substrate(api_key=api_key, timeout=60 * 5) -schema = { - "type": "object", - "properties": { - "main_object": {"type": "string"}, - "replacement": {"type": "string"}, - }, - "required": ["main_object"], -} -image_uri = "https://media.substrate.run/desk.jpeg" - -replacement = Firellava13B( - prompt="Identify the main object in the image. Then think of something funny to replace it with. Respond with the replacement. Your answer should be only one or two words.", - image_uris=[image_uri], -) -image = GenerateImage(prompt=sb.concat("a picture of a ", replacement.future.text), image_uri=image_uri, store="hosted") -result = substrate.run(image) -viz = Substrate.visualize(image) -os.system(f"open {viz}") - -print(json.dumps(result.json, indent=2)) diff --git a/examples/notebooks/IBMPlexSans-Medium.ttf b/examples/notebooks/IBMPlexSans-Medium.ttf deleted file mode 100644 index 9395402..0000000 Binary files a/examples/notebooks/IBMPlexSans-Medium.ttf and /dev/null differ diff --git a/examples/notebooks/Makefile b/examples/notebooks/Makefile deleted file mode 100644 index bb36a7d..0000000 --- a/examples/notebooks/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -.DEFAULT_GOAL := help -SHELL := /bin/bash - -default: help; - -.PHONY: help -help: - @echo "Substrate notebooks" - @echo "" - @echo " ensure Install dependencies" - @echo " update Update substrate-python to the latest version" - -poetry.lock: pyproject.toml - poetry lock - -ensure: poetry.lock - poetry install --no-root - -.PHONY: update -update: - poetry cache clear pypi --all && poetry update substrate diff --git a/examples/notebooks/background-removal.py b/examples/notebooks/background-removal.py deleted file mode 100644 index 2a88eaf..0000000 --- a/examples/notebooks/background-removal.py +++ /dev/null @@ -1,125 +0,0 @@ -import marimo - -__generated_with = "0.3.12" -app = marimo.App(width="medium") - - -@app.cell -def __(): - import os - import json - import base64 - import marimo as mo - from substrate import ( - Substrate, - GenerateImage, - RemoveBackground, - InpaintImage, - EraseImage, - UpscaleImage, - sb, - ) - - api_key = os.environ.get("SUBSTRATE_API_KEY") - api_key = api_key or "YOUR_API_KEY" - substrate = Substrate( - api_key=api_key, - ) - return ( - EraseImage, - GenerateImage, - InpaintImage, - RemoveBackground, - Substrate, - UpscaleImage, - api_key, - base64, - json, - mo, - os, - sb, - substrate, - ) - - -@app.cell -def __(mo): - prompt = mo.ui.text( - placeholder="prompt", - value="a dark red chesterfield leather wing chair in a dark majestic room, pillars, celestial galaxy wallpaper", - full_width=True, - ).form() - prompt - return prompt, - - -@app.cell -def __(EraseImage, GenerateImage, InpaintImage, RemoveBackground, prompt): - image = GenerateImage( - prompt=prompt.value, - ) - fg = RemoveBackground(image_uri=image.future.image_uri) - mask = RemoveBackground( - image_uri=image.future.image_uri, - return_mask=True, - ) - bg = EraseImage( - image_uri=image.future.image_uri, - mask_image_uri=mask.future.image_uri, - ) - bg_prompt = "empty dark majestic room, celestial galaxy wallpaper, high resolution AD" - inpaint = InpaintImage(image_uri=bg.future.image_uri, prompt=bg_prompt) - return bg, bg_prompt, fg, image, inpaint, mask - - -@app.cell -def __(bg, fg, image, inpaint, mask, mo, substrate, upscale): - viz = substrate.visualize(image, fg, mask, bg, inpaint, upscale) - mo.md(f"[viz]({viz})") - return viz, - - -@app.cell -def __(bg, fg, image, inpaint, mask, mo, substrate, upscale): - res = substrate.run(image, fg, mask, bg, inpaint, upscale) - print(res) - mo.tree(res.json) - return res, - - -@app.cell -def __(bg, fg, image, inpaint, mask, mo, res): - mo.carousel( - items=[ - mo.vstack( - [ - mo.image(src=res.get(image).image_uri), - ] - ), - mo.vstack( - [ - mo.image(src=res.get(fg).image_uri), - ] - ), - mo.vstack( - [ - mo.image(src=res.get(mask).image_uri), - ] - ), - mo.vstack( - [ - mo.image(src=res.get(bg).image_uri), - ] - ), - mo.vstack( - [ - mo.image(src=res.get(inpaint).image_uri), - ] - ), - ] - ) - return - - -if __name__ == "__main__": - app.run() diff --git a/examples/notebooks/basic.py b/examples/notebooks/basic.py deleted file mode 100644 index e52b347..0000000 --- a/examples/notebooks/basic.py +++ /dev/null @@ -1,57 +0,0 @@ -import marimo - -__generated_with = "0.3.12" -app = marimo.App() - - -@app.cell -def __(): - import os - import json - import base64 - - import marimo as mo - - api_key = os.environ.get("SUBSTRATE_API_KEY") - api_key = api_key or "YOUR_API_KEY" - api_key - return api_key, base64, json, mo, os - - -@app.cell -def __(api_key): - from substrate import Substrate, ComputeText, Box, If, sb - - substrate = Substrate(api_key=api_key) - return Box, ComputeText, If, Substrate, sb, substrate - - -@app.cell -def __(Box, ComputeText): - story = ComputeText(prompt="tell me a story") - box = Box(value={ - "story": story.future.text - }) - return box, story - - -@app.cell -def __(box, story, substrate): - res = substrate.run(story, box) - return res, - - -@app.cell -def __(box, mo, res): - mo.tree(res.get(box).value) - return - - -@app.cell -def __(mo, res, story): - mo.md(res.get(story).text) - return - - -if __name__ == "__main__": - app.run() diff --git a/examples/notebooks/blog-images.py b/examples/notebooks/blog-images.py deleted file mode 100644 index d453b44..0000000 --- a/examples/notebooks/blog-images.py +++ /dev/null @@ -1,208 +0,0 @@ -import marimo - -__generated_with = "0.6.23" -app = marimo.App(width="medium") - - -@app.cell -def __(): - import marimo as mo - return mo, - - -@app.cell -def __(mo): - from PIL import Image, ImageDraw, ImageFont - from io import BytesIO - import os - import base64 - from textwrap import dedent - - text = """tasteful AI - marketing image""" - width = 1944 - height = 1024 - image = Image.new("RGB", (width, height), color="white") - draw = ImageDraw.Draw(image) - try: - font = ImageFont.truetype("examples/notebooks/IBMPlexSans-Medium.ttf", 200) - except IOError: - print("couldn't load font") - font = ImageFont.load_default(200) - - bbox = draw.textbbox((0, 0), text, font=font) - text_width = bbox[2] - bbox[0] - text_height = bbox[3] - bbox[1] - - x = (width - text_width) / 2 - y = (height - text_height) / 2 - draw.text((x, y), text, font=font, fill="black") - buffered = BytesIO() - image.save(buffered, format="PNG") - - img_str = base64.b64encode(buffered.getvalue()) - base_img_data = f"data:image/png;base64,{img_str.decode('ascii')}" - mo.image(base_img_data) - return ( - BytesIO, - Image, - ImageDraw, - ImageFont, - base64, - base_img_data, - bbox, - buffered, - dedent, - draw, - font, - height, - image, - img_str, - os, - text, - text_height, - text_width, - width, - x, - y, - ) - - -@app.cell -def __(os): - from substrate import ( - Substrate, - GenerateImage, - StableDiffusionXLControlNet, - RemoveBackground, - UpscaleImage, - ) - api_key = os.environ.get("SUBSTRATE_API_KEY") - substrate = Substrate(api_key=api_key) - return ( - GenerateImage, - RemoveBackground, - StableDiffusionXLControlNet, - Substrate, - UpscaleImage, - api_key, - substrate, - ) - - -@app.cell -def __( - RemoveBackground, - StableDiffusionXLControlNet, - UpscaleImage, - base_img_data, - substrate, -): - mask = RemoveBackground( - image_uri=base_img_data, - return_mask=True, - ) - prompt = "birds eye aerial view of clouds and ocean waves at sunset" - controlnet = StableDiffusionXLControlNet( - image_uri=mask.future.image_uri, - prompt=prompt, - control_method="illusion", - conditioning_scale=0.9, - strength=0.6, - num_images=1, - ) - upscale = UpscaleImage( - image_uri=controlnet.future.outputs[0].image_uri, - prompt=f"hokusai highly detailed woodblock print, bright colors {prompt}", - output_resolution=2048, - ) - res = substrate.run(upscale) - return controlnet, mask, prompt, res, upscale - - -@app.cell -def __(controlnet, mask, mo, res, upscale): - mo.vstack( - [ - mo.hstack( - [ - mo.image(res.get(mask).image_uri), - mo.image(res.get(controlnet).outputs[0].image_uri), - ] - ), - mo.image(res.get(upscale).image_uri), - ] - ) - return - - -@app.cell -def __(BytesIO, Image, ImageDraw, base64, font, height, text, width, x, y): - import re - import numpy as np - from PIL import ImageChops - - - def dilate(image, iterations=1): - image_array = np.array(image) - kernel = np.ones((3, 3), np.uint8) - for _ in range(iterations): - image_array = np.pad(image_array, 1, mode="constant") - dilated = np.zeros_like(image_array) - for i in range(1, image_array.shape[0] - 1): - for j in range(1, image_array.shape[1] - 1): - dilated[i, j] = np.max(image_array[i - 1 : i + 2, j - 1 : j + 2] * kernel) - image_array = dilated[1:-1, 1:-1] - return Image.fromarray(image_array) - - - def draw_text(img, x, y, text, font, outline_color, outline_width=2): - text_img = Image.new("L", img.size, 0) - text_draw = ImageDraw.Draw(text_img) - text_draw.text((x, y), text, font=font, fill=255) - outline_img = dilate(text_img, iterations=outline_width) - hollow_outline = ImageChops.subtract(outline_img, text_img) - outline_rgba = Image.new("RGBA", img.size, (0, 0, 0, 0)) - outline_rgba.putalpha(hollow_outline) - colored_outline = Image.new("RGBA", img.size, outline_color) - colored_outline.putalpha(hollow_outline) - result = Image.alpha_composite(img, colored_outline) - return result - - - def final_image(image_uri): - base64_string = re.sub(r"^data:image/.+;base64,", "", image_uri) - image_data = base64.b64decode(base64_string) - original_image = Image.open(BytesIO(image_data)).convert("RGBA") - resized_image = original_image.resize((width, height), Image.LANCZOS) - finalimg = Image.new("RGBA", resized_image.size, (255, 255, 255, 0)) - finalimg.paste(resized_image, (0, 0), resized_image) - - outline_color = (255, 255, 255, 255) - outline_width = 3 - - finalimg = draw_text(finalimg, x, y, text, font, outline_color, outline_width) - - finalbuff = BytesIO() - finalimg.save(finalbuff, format="PNG") - finalimg_str = base64.b64encode(finalbuff.getvalue()).decode("ascii") - return f"data:image/png;base64,{finalimg_str}" - return ImageChops, dilate, draw_text, final_image, np, re - - -@app.cell -def __(): - # controlnet_final = final_image(res.get(controlnet).outputs[0].image_uri) - # mo.image(controlnet_final) - return - - -@app.cell -def __(): - # upscale_final = final_image(res.get(upscale).image_uri) - # mo.image(upscale_final) - return - - -if __name__ == "__main__": - app.run() diff --git a/examples/notebooks/edit-poster.py b/examples/notebooks/edit-poster.py deleted file mode 100644 index d936fcf..0000000 --- a/examples/notebooks/edit-poster.py +++ /dev/null @@ -1,143 +0,0 @@ -import marimo - -__generated_with = "0.3.12" -app = marimo.App(width="medium") - - -@app.cell -def __(__file__): - import os - import sys - import typing_extensions - from pathlib import Path - import marimo as mo - - # add parent dir to sys.path to make 'substrate' importable - parent_dir = Path(__file__).resolve().parent.parent - sys.path.insert(0, str(parent_dir)) - - api_key = os.environ.get("SUBSTRATE_API_KEY") - if api_key is None: - raise EnvironmentError("No SUBSTRATE_API_KEY set") - return Path, api_key, mo, os, parent_dir, sys, typing_extensions - - -@app.cell -def __(): - from substrate import ( - Substrate, - StableDiffusionXLControlNet, - GenerativeEditImage, - MultiGenerativeEditImage, - UpscaleImage, - RemoveBackground, - RunPython, - ) - return ( - GenerativeEditImage, - MultiGenerativeEditImage, - RemoveBackground, - RunPython, - StableDiffusionXLControlNet, - Substrate, - UpscaleImage, - ) - - -@app.cell -def __(Substrate, api_key): - substrate = Substrate(api_key=api_key) - return substrate, - - -@app.cell -def __( - MultiGenerativeEditImage, - RemoveBackground, - RunPython, - StableDiffusionXLControlNet, - substrate, -): - # original = "https://blog.substrate.run/launch-image.png" - original = "https://media.substrate.run/spc-tw.png" - controlnet = StableDiffusionXLControlNet( - image_uri=original, - control_method="edge", - prompt="neon lights, retro futuristic 80s club", - conditioning_scale=1.0, - num_images=1, - ) - mask = RemoveBackground( - image_uri=original, - return_mask=True, - store="hosted", - ) - crop = RunPython( - input={ - "image": mask.future.image_uri, - }, - pip_install=["requests", "pillow"], - code="""# get the bottom left portion of the mask - from PIL import Image - from io import BytesIO - import base64, requests - response = requests.get(SB_IN["image"]) - img = Image.open(BytesIO(response.content)) - full = 800 - section = 550 - bg = Image.new('RGB', (full, full), (0, 0, 0)) - cropped = img.crop((0, full - section, section, full)) - bg.paste(cropped, (0, full - section)) - buffer = BytesIO() - bg.save(buffer, format="jpeg") - b64 = base64.b64encode(buffer.getvalue()).decode("utf-8") - SB_OUT["image"] = f"data:image/jpeg;base64,{b64}" - """, - ) - num_images = 3 - edit = MultiGenerativeEditImage( - image_uri=controlnet.future.outputs[0].image_uri, - mask_image_uri=crop.future.output["image"], - prompt="bright white mirrored metallic water surface high resolution CG render", - num_images=num_images, - ) - res = substrate.run(controlnet, mask, crop, edit) - return controlnet, crop, edit, mask, num_images, original, res - - -@app.cell -def __(crop, mo, res): - mo.download(res.get(crop).output["image"]) - return - - -@app.cell -def __(mo, res): - mo.tree(res.json) - return - - -@app.cell -def __(edit, mo, num_images, res): - mo.hstack( - [ - mo.image(res.get(edit).outputs[i].image_uri) - for i in list(range(num_images)) - ] - ) - return - - -@app.cell -def __(edit, mo, num_images, res): - mo.hstack( - [ - mo.download(res.get(edit).outputs[i].image_uri) - for i in list(range(num_images)) - ] - ) - return - - -if __name__ == "__main__": - app.run() diff --git a/examples/notebooks/film-showings.py b/examples/notebooks/film-showings.py deleted file mode 100644 index c4d3621..0000000 --- a/examples/notebooks/film-showings.py +++ /dev/null @@ -1,193 +0,0 @@ -import marimo - -__generated_with = "0.3.12" -app = marimo.App(width="full") - - -@app.cell -def __(__file__): - import os - import sys - import typing_extensions - from pathlib import Path - import marimo as mo - from substrate import ( - Substrate, - GenerateJSON, - GenerateText, - RunPython, - sb, - ) - - # add parent dir to sys.path to make 'substrate' importable - parent_dir = Path(__file__).resolve().parent.parent - sys.path.insert(0, str(parent_dir)) - - api_key = os.environ.get("SUBSTRATE_API_KEY") - if api_key is None: - raise EnvironmentError("No SUBSTRATE_API_KEY set") - - substrate = Substrate(api_key=api_key) - return ( - GenerateJSON, - GenerateText, - Path, - RunPython, - Substrate, - api_key, - mo, - os, - parent_dir, - sb, - substrate, - sys, - typing_extensions, - ) - - -@app.cell -def __(): - return - - -@app.cell -def __(): - import requests, re - from bs4 import BeautifulSoup - from datetime import datetime, timedelta - - today = datetime.today() - tomorrow = today + timedelta(days=1) - today_str = today.strftime("%Y-%m-%d") - tomorrow_str = tomorrow.strftime("%Y-%m-%d") - - response = requests.get(f"https://metrograph.com/calendar") - soup = BeautifulSoup(response.text, "html.parser") - pattern = r"^/film/\?vista_film_id=" - pattern_re = re.compile(pattern) - urls = [] - today_el = soup.find(id=f"calendar-list-day-{today_str}") - tomorrow_el = soup.find(id=f"calendar-list-day-{tomorrow_str}") - for anchor in today_el.find_all("a", href=True): - if pattern_re.match(anchor["href"]): - urls.append(f"https://metrograph.com{anchor['href']}") - for anchor in tomorrow_el.find_all("a", href=True): - if pattern_re.match(anchor["href"]): - urls.append(f"https://metrograph.com{anchor['href']}") - urls = list(set(urls)) - return ( - BeautifulSoup, - anchor, - datetime, - pattern, - pattern_re, - re, - requests, - response, - soup, - timedelta, - today, - today_el, - today_str, - tomorrow, - tomorrow_el, - tomorrow_str, - urls, - ) - - -@app.cell -def __(mo, urls): - mo.tree(urls) - return - - -@app.cell -def __(): - from pydantic import BaseModel, Field - return BaseModel, Field - - -@app.cell -def __( - BaseModel, - Field, - GenerateJSON, - GenerateText, - RunPython, - sb, - substrate, - urls, -): - summaries = [] - mds = [] - import json - - - class Film(BaseModel): - title: str = Field(..., description="The film's title") - url: str = Field(..., description="The film's url from the top of the text") - description: str = Field(..., description="A short summary of the film including genre, director, and year.") - showtimes: list[str] = Field(..., description="List of showtimes for the film.") - - - for url in urls[:1]: - md = RunPython( - input={ - "url": url, - }, - code="""import requests - from bs4 import BeautifulSoup - from markdownify import markdownify - url = SB_IN['url'] - print(url) - res = requests.get(url) - soup = BeautifulSoup(res.content, 'html.parser') - SB_OUT['markdown'] = markdownify(str(soup)) - """, - pip_install=["requests", "beautifulsoup4", "markdownify"], - ) - - mds.append(md) - - summary = GenerateJSON( - prompt=sb.concat( - "Summarize the following markdown about a film playing at local theater, generating JSON following the schema below\n ", - md.future.output["markdown"], - ), - json_schema=Film.model_json_schema(), - node="Llama3Instruct8B", - ) - summaries.append(summary) - - markdown = GenerateText( - prompt=sb.concat( - "Generate markdown summarizing the following movies. Include title in brackets followed by the url of the film in parentheses, e.g. [title](url). Do not mix up urls. Include a very concise one sentence description. Do not include the theater where the film is playing. Include showtimes. Today is the earliest date that appears, replace the appropriate dates with TODAY and TOMORROW. Do not include preamble before the markdown. Categorize the movies into a few genres.\n", - *[sb.jq(s.future.json_object, "@json") for s in summaries], - ), - node="Llama3Instruct70B", - ) - res = substrate.run(*summaries, *mds, markdown) - return Film, json, markdown, md, mds, res, summaries, summary, url - - -@app.cell -def __(mo, res): - mo.tree(res.json) - return - - -@app.cell -def __(markdown, mo, res): - mo.md(res.get(markdown).text) - return - - -@app.cell -def __(markdown, res): - print(res.get(markdown).text) - return - - -if __name__ == "__main__": - app.run() diff --git a/examples/notebooks/first-graph.py b/examples/notebooks/first-graph.py deleted file mode 100644 index a3000c2..0000000 --- a/examples/notebooks/first-graph.py +++ /dev/null @@ -1,68 +0,0 @@ -import marimo - -__generated_with = "0.3.12" -app = marimo.App() - - -@app.cell -def __(): - import os - import json - import base64 - - import marimo as mo - - api_key = os.environ.get("SUBSTRATE_API_KEY") - api_key = api_key or "YOUR_API_KEY" - api_key - return api_key, base64, json, mo, os - - -@app.cell -def __(api_key): - from substrate import Substrate, GenerateImage, GenerateText, sb - - substrate = Substrate(api_key=api_key) - return GenerateImage, GenerateText, Substrate, sb, substrate - - -@app.cell -def __(GenerateImage, GenerateText, sb, substrate): - scene = GenerateText( - prompt="a short detailed descriptions of a mythical forest creature: ", - ) - styles = ["woodblock printed", "art nouveau poster"] - images = [ - GenerateImage(prompt=sb.concat("render in a ", style, " style: ", scene.future.text)) - for style in styles - ] - - result = substrate.run(scene, *images) - return images, result, scene, styles - - -@app.cell -def __(mo, result): - mo.tree(result.api_response.json) - return - - -@app.cell -def __(): - return - - -@app.cell -def __(images, mo, result): - mo.download(result.get(images[0]).image_uri) - return - - -@app.cell -def __(images, mo, result): - mo.download(result.get(images[1]).image_uri) - return - - -if __name__ == "__main__": - app.run() diff --git a/examples/notebooks/image-game.py b/examples/notebooks/image-game.py deleted file mode 100644 index d859bf0..0000000 --- a/examples/notebooks/image-game.py +++ /dev/null @@ -1,236 +0,0 @@ -import marimo - -__generated_with = "0.3.12" -app = marimo.App(width="medium") - - -@app.cell -def __(): - # enter your API key (or store it in the SUBSTRATE_API_KEY env var) - import os - - api_key = os.environ.get("SUBSTRATE_API_KEY") - api_key = api_key or "YOUR_API_KEY" - return api_key, os - - -@app.cell(hide_code=True) -def __(api_key): - # import modules + initialize substrate - import time - import datetime - import json - import string - import random - import base64 - import marimo as mo - import substrate as sb - - substrate = sb.Substrate(api_key=api_key) - return base64, datetime, json, mo, random, sb, string, substrate, time - - -@app.cell -def __(datetime, mo, sb, substrate): - # create a vector store - now = datetime.datetime.now() - start_of_day = now.replace(hour=0, minute=0, second=0, microsecond=0) - start_of_day_ts = int(start_of_day.timestamp()) - collection_name = f"image_test_{start_of_day_ts}" - mo.md(f"collection name: {collection_name}") - create_vstore = sb.CreateVectorStore(model="clip", collection_name=collection_name) - create_res = substrate.run(create_vstore) - mo.accordion({"response": mo.tree(create_res.json)}) - return ( - collection_name, - create_res, - create_vstore, - now, - start_of_day, - start_of_day_ts, - ) - - -@app.cell(hide_code=True) -def __(mo): - prompt = mo.ui.text( - placeholder="prompt", - label="Enter a secret image prompt", - value="A bowl of fruit", - kind="password", - full_width=True, - ).form() - prompt - return (prompt,) - - -@app.cell -def __(collection_name, mo, prompt, sb, substrate): - # generate an image and embed it - image = sb.GenerateImage( - prompt=prompt.value, - ) - embed = sb.EmbedImage( - image_uri=image.future.image_uri, - collection_name=collection_name, - ) - res = substrate.run(image, embed) - mo.accordion({"response": mo.tree(res.json)}) - return embed, image, res - - -@app.cell(hide_code=True) -def __(embed, image, mo, res): - mo.vstack( - [ - mo.image(src=res.get(image).image_uri, width=400), - mo.md(f"embedding id: `{res.get(embed).embedding.doc_id}`"), - ] - ) - return - - -@app.cell -def __(mo): - guesses = ( - mo.md( - """ - ### Let two other people try to generate a similar image: - - Guess prompt 1 {guess1} - - Guess prompt 2 {guess2} - """ - ) - .batch(guess1=mo.ui.text(full_width=True), guess2=mo.ui.text(full_width=True)) - .form() - ) - guesses - return (guesses,) - - -@app.cell -def __(collection_name, guesses, sb): - # Generate and embed the images - guess1image = sb.GenerateImage( - prompt=guesses.value["guess1"], - ) - guess2image = sb.GenerateImage( - prompt=guesses.value["guess2"], - ) - embed1 = sb.EmbedImage( - image_uri=guess1image.future.image_uri, - collection_name=collection_name, - ) - embed2 = sb.EmbedImage( - image_uri=guess2image.future.image_uri, - collection_name=collection_name, - ) - return embed1, embed2, guess1image, guess2image - - -@app.cell -def __(embed1, embed2, guess1image, guess2image, mo, substrate): - guess_res = substrate.run(guess1image, guess2image, embed1, embed2) - mo.accordion({"response": mo.tree(guess_res.json)}) - return (guess_res,) - - -@app.cell -def __(embed1, embed2, guess_res, mo): - image1_embed_id = guess_res.get(embed1).embedding.doc_id - image2_embed_id = guess_res.get(embed2).embedding.doc_id - mo.accordion({"ids": mo.tree({"image1": image1_embed_id, "image2": image2_embed_id})}) - return image1_embed_id, image2_embed_id - - -@app.cell -def __(collection_name, guess1image, guess2image, guess_res, sb): - # query with the embeddings of the two image guesses - query = sb.QueryVectorStore( - model="clip", - collection_name=collection_name, - query_image_uris=[ - guess_res.get(guess1image).image_uri, - guess_res.get(guess2image).image_uri, - ], - top_k=100, - ef_search=64, - ) - return (query,) - - -@app.cell -def __(mo, query, substrate): - query_res = substrate.run(query) - query_items = query_res.get(query).results - mo.accordion({"items": mo.tree(query_items)}) - return query_items, query_res - - -@app.cell -def __(embed, mo, query_items, res): - # get the similarity of the two guesses to the original image - orig_embed_id = res.get(embed).embedding.doc_id - match1 = next((i for i in query_items[0] if i.id == orig_embed_id), None) - match2 = next((i for i in query_items[1] if i.id == orig_embed_id), None) - match1_wins = match1.distance < match2.distance - - mo.accordion( - { - "result": mo.tree( - { - "orig_embed_id": orig_embed_id, - "image1_distance": match1.distance, - "image2_distance": match2.distance, - "match1_wins": match1_wins, - } - ) - } - ) - return match1, match1_wins, match2, orig_embed_id - - -@app.cell -def __( - guess1image, - guess2image, - guess_res, - guesses, - image, - match1, - match1_wins, - match2, - mo, - prompt, - res, -): - mo.hstack( - [ - mo.vstack( - [ - mo.image(src=res.get(image).image_uri), - mo.md(f"Original prompt: {prompt.value}"), - ] - ), - mo.vstack( - [ - mo.image(src=guess_res.get(guess1image).image_uri), - mo.md(f"Guess 1: {guesses.value['guess1']}"), - mo.md(f"Distance: {match1.distance}"), - mo.md(f"**{'WINNER' if match1_wins else 'LOSER'}**"), - ] - ), - mo.vstack( - [ - mo.image(src=guess_res.get(guess2image).image_uri), - mo.md(f"Guess 2: {guesses.value['guess2']}"), - mo.md(f"Distance: {match2.distance}"), - mo.md(f"**{'LOSER' if match1_wins else 'WINNER'}**"), - ] - ), - ] - ) - return - - -if __name__ == "__main__": - app.run() diff --git a/examples/notebooks/inpaint-poster.py b/examples/notebooks/inpaint-poster.py deleted file mode 100644 index 93547bc..0000000 --- a/examples/notebooks/inpaint-poster.py +++ /dev/null @@ -1,127 +0,0 @@ -import marimo - -__generated_with = "0.3.12" -app = marimo.App(width="medium") - - -@app.cell -def __(__file__): - import os - import sys - import typing_extensions - from pathlib import Path - import marimo as mo - - # add parent dir to sys.path to make 'substrate' importable - parent_dir = Path(__file__).resolve().parent.parent - sys.path.insert(0, str(parent_dir)) - - api_key = os.environ.get("SUBSTRATE_API_KEY") - if api_key is None: - raise EnvironmentError("No SUBSTRATE_API_KEY set") - return Path, api_key, mo, os, parent_dir, sys, typing_extensions - - -@app.cell -def __(api_key): - from substrate import ( - Substrate, - RemoveBackground, - MultiGenerativeEditImage, - StableDiffusionXLInpaint, - UpscaleImage, - RunPython, - ) - - substrate = Substrate(api_key=api_key) - return ( - MultiGenerativeEditImage, - RemoveBackground, - RunPython, - StableDiffusionXLInpaint, - Substrate, - UpscaleImage, - substrate, - ) - - -@app.cell -def __(RemoveBackground, RunPython, StableDiffusionXLInpaint, substrate): - original_image = "https://media.substrate.run/spc-tw.png" - mask = RemoveBackground( - image_uri=original_image, - return_mask=True, - store="hosted", - ) - crop = RunPython( - input={ - "image": mask.future.image_uri, - }, - pip_install=["requests", "pillow"], - code="""# get the bottom left portion of the mask - from PIL import Image - from io import BytesIO - import base64, requests - response = requests.get(SB_IN["image"]) - img = Image.open(BytesIO(response.content)) - full = 800 - section = 550 - bg = Image.new('RGB', (full, full), (0, 0, 0)) - cropped = img.crop((0, full - section, section, full)) - bg.paste(cropped, (0, full - section)) - buffer = BytesIO() - bg.save(buffer, format="jpeg") - b64 = base64.b64encode(buffer.getvalue()).decode("utf-8") - SB_OUT["image"] = f"data:image/jpeg;base64,{b64}" - """, - ) - edit = StableDiffusionXLInpaint( - image_uri="https://media.substrate.run/spc-tw.png", - mask_image_uri=crop.future.output["image"], - strength=0.92, - prompt="retro computer with black and red smoke and flames billowing out of the screen, high resolution poster", - negative_prompt="rainbow, paint", - store="hosted", - num_images=5, - ) - res = substrate.run(mask, crop, edit) - return crop, edit, mask, original_image, res - - -@app.cell -def __(crop, mask, mo, original_image, res): - mo.hstack( - [ - mo.image(original_image), - mo.image(res.get(mask).image_uri), - mo.image(res.get(crop).output["image"]), - ] - ) - return - - -@app.cell -def __(edit, mo, res): - mo.hstack([ - mo.image(res.get(edit).outputs[0].image_uri), - mo.image(res.get(edit).outputs[1].image_uri), - mo.image(res.get(edit).outputs[2].image_uri), - mo.image(res.get(edit).outputs[3].image_uri), - mo.image(res.get(edit).outputs[4].image_uri), - ]) - return - - -@app.cell -def __(edit, mo, res): - mo.hstack([ - res.get(edit).outputs[0].seed, - res.get(edit).outputs[1].seed, - res.get(edit).outputs[2].seed, - res.get(edit).outputs[3].seed, - ]) - return - - -if __name__ == "__main__": - app.run() diff --git a/examples/notebooks/interior-design.py b/examples/notebooks/interior-design.py deleted file mode 100644 index 73d1227..0000000 --- a/examples/notebooks/interior-design.py +++ /dev/null @@ -1,167 +0,0 @@ -import marimo - -__generated_with = "0.3.12" -app = marimo.App(width="medium") - - -@app.cell -def __(__file__): - import os - import sys - import typing_extensions - from pathlib import Path - import marimo as mo - - # add parent dir to sys.path to make 'substrate' importable - parent_dir = Path(__file__).resolve().parent.parent - sys.path.insert(0, str(parent_dir)) - - api_key = os.environ.get("SUBSTRATE_API_KEY") - if api_key is None: - raise EnvironmentError("No SUBSTRATE_API_KEY set") - return Path, api_key, mo, os, parent_dir, sys, typing_extensions - - -@app.cell -def __(api_key): - from substrate import ( - Substrate, - StableDiffusionXLControlNet, - StableDiffusionXLInpaint, - GenerativeEditImage, - GenerateTextVision, - GenerateText, - sb, - ) - - substrate = Substrate(api_key=api_key) - return ( - GenerateText, - GenerateTextVision, - GenerativeEditImage, - StableDiffusionXLControlNet, - StableDiffusionXLInpaint, - Substrate, - sb, - substrate, - ) - - -@app.cell -def __( - GenerateText, - GenerateTextVision, - StableDiffusionXLInpaint, - sb, - substrate, -): - styles = ["sunlit onsen style tokyo office", "80s disco style berlin office at night"] - images = [ - StableDiffusionXLInpaint( - image_uri="https://media.substrate.run/office.jpg", - # control_method="depth", - strength=0.75, - prompt=s, - num_images=1, - ) - for s in styles - ] - descriptions = [ - GenerateTextVision( - prompt="Describe the interesting interior decor touches in this image", - # image_uris=[i.future.image_uri], - image_uris=[i.future.outputs[0].image_uri], - ) - for i in images - ] - summaries = [ - GenerateText( - prompt=sb.concat( - "Summarize the 2 most interesting details in one sentence, be concise: ", - d.future.text, - ), - ) - for d in descriptions - ] - res = substrate.run(*images, *descriptions, *summaries) - return descriptions, images, res, styles, summaries - - -@app.cell -def __(mo, res): - mo.tree(res.json) - return - - -@app.cell -def __(mo, original_image): - mo.image(original_image) - return - - -@app.cell -def __(images, mo, res, summaries): - mo.vstack( - [ - mo.vstack( - [ - mo.image(res.get(images[0]).image_uri), - mo.md(res.get(summaries[0]).text), - ] - ), - mo.vstack( - [ - mo.image(res.get(images[1]).image_uri), - mo.md(res.get(summaries[1]).text), - ] - ), - ] - ) - return - - -@app.cell -def __(images, mo, res, summaries): - mo.vstack( - [ - mo.vstack( - [ - mo.image(res.get(images[0]).outputs[0].image_uri), - mo.md(res.get(summaries[0]).text), - ] - ), - mo.vstack( - [ - mo.image(res.get(images[1]).outputs[0].image_uri), - mo.md(res.get(summaries[1]).text), - ] - ), - ] - ) - return - - -@app.cell -def __(images, mo, res): - mo.hstack( - [ - mo.download(res.get(images[0]).image_uri), - mo.download(res.get(images[1]).image_uri), - ] - ) - return - - -@app.cell -def __(images, mo, res): - mo.hstack( - [ - mo.download(res.get(images[0]).outputs[0].image_uri), - mo.download(res.get(images[1]).outputs[0].image_uri), - ] - ) - return - - -if __name__ == "__main__": - app.run() diff --git a/examples/notebooks/interpolate.py b/examples/notebooks/interpolate.py deleted file mode 100644 index e34fb55..0000000 --- a/examples/notebooks/interpolate.py +++ /dev/null @@ -1,112 +0,0 @@ -import marimo - -__generated_with = "0.6.23" -app = marimo.App() - - -@app.cell -def __(): - import os - import json - - import marimo as mo - - api_key = os.environ.get("SUBSTRATE_API_KEY") - api_key = api_key or "YOUR_API_KEY" - print(api_key) - return api_key, json, mo, os - - -@app.cell -def __(api_key): - from substrate import Substrate - - substrate = Substrate(api_key=api_key, base_url="https://api.substrate.run") - return Substrate, substrate - - -@app.cell -def __(substrate): - from substrate import GenerateImage, InterpolateFrames, StableDiffusionXLInpaint - - # Generate a base image - base_image = GenerateImage(prompt="aerial view of ocean waves") - - # Generate variations - times = [ - "6am sunrise", - "1pm afternoon bright sun", - "8pm after sunset", - ] - images = [] - for t in times: - image = StableDiffusionXLInpaint( - image_uri=base_image.future.image_uri, - prompt=f"aerial view of rainforest, {t}", - num_images=1, - strength=0.9, - ) - images.append(image) - - # Interpolate from base through variations - interpolate = InterpolateFrames( - frame_uris=[ - base_image.future.image_uri, - images[0].future.outputs[0].image_uri, - images[1].future.outputs[0].image_uri, - images[2].future.outputs[0].image_uri, - base_image.future.image_uri, - ], - num_steps=2, - store="hosted", - output_format="mp4", - ) - res = substrate.run(interpolate) - return ( - GenerateImage, - InterpolateFrames, - StableDiffusionXLInpaint, - base_image, - image, - images, - interpolate, - res, - t, - times, - ) - - -@app.cell -def __(res): - print(res.request_id) - print(res) - return - - -@app.cell -def __(interpolate, res): - print(res.get(interpolate).video_uri) - return - - -@app.cell -def __(interpolate, mo, res): - mo.image(res.get(interpolate).video_uri) - return - - -@app.cell -def __(images, mo, res): - mo.vstack( - [ - mo.image(res.get(images[0]).outputs[0].image_uri), - mo.image(res.get(images[1]).outputs[0].image_uri), - mo.image(res.get(images[2]).outputs[0].image_uri), - mo.image(res.get(images[3]).outputs[0].image_uri), - ] - ) - return - - -if __name__ == "__main__": - app.run() diff --git a/examples/notebooks/logo-controlnet.py b/examples/notebooks/logo-controlnet.py deleted file mode 100644 index f351757..0000000 --- a/examples/notebooks/logo-controlnet.py +++ /dev/null @@ -1,72 +0,0 @@ -import marimo - -__generated_with = "0.3.12" -app = marimo.App(width="medium") - - -@app.cell -def __(__file__): - import os - import sys - import typing_extensions - from pathlib import Path - import marimo as mo - - # add parent dir to sys.path to make 'substrate' importable - parent_dir = Path(__file__).resolve().parent.parent - sys.path.insert(0, str(parent_dir)) - - api_key = os.environ.get("SUBSTRATE_API_KEY") - if api_key is None: - raise EnvironmentError("No SUBSTRATE_API_KEY set") - return Path, api_key, mo, os, parent_dir, sys, typing_extensions - - -@app.cell -def __(api_key): - from substrate import ( - Substrate, - RemoveBackground, - StableDiffusionXLControlNet, - UpscaleImage, - ) - - s = Substrate(api_key=api_key) - return ( - RemoveBackground, - StableDiffusionXLControlNet, - Substrate, - UpscaleImage, - s, - ) - - -@app.cell -def __(RemoveBackground, StableDiffusionXLControlNet, s): - num_images = 2 - mask = RemoveBackground(image_uri="https://media.substrate.run/logo-sq.png", return_mask=True) - controlnet = StableDiffusionXLControlNet( - image_uri=mask.future.image_uri, - control_method="illusion", - conditioning_scale=1.0, - prompt="street view futuristic solarpunk city of atlantis", - num_images=num_images, - ) - res = s.run(mask, controlnet) - return controlnet, mask, num_images, res - - -@app.cell -def __(controlnet, mo, num_images, res): - mo.hstack([mo.image(res.get(controlnet).outputs[i].image_uri) for i in list(range(num_images))]) - return - - -@app.cell -def __(controlnet, mo, num_images, res): - mo.hstack([mo.download(res.get(controlnet).outputs[i].image_uri) for i in list(range(num_images))]) - return - - -if __name__ == "__main__": - app.run() diff --git a/examples/notebooks/logo-inpaint.py b/examples/notebooks/logo-inpaint.py deleted file mode 100644 index 79c2ce6..0000000 --- a/examples/notebooks/logo-inpaint.py +++ /dev/null @@ -1,103 +0,0 @@ -import marimo - -__generated_with = "0.3.12" -app = marimo.App(width="medium") - - -@app.cell -def __(__file__): - import os - import sys - import typing_extensions - from pathlib import Path - import marimo as mo - - # add parent dir to sys.path to make 'substrate' importable - parent_dir = Path(__file__).resolve().parent.parent - sys.path.insert(0, str(parent_dir)) - - api_key = os.environ.get("SUBSTRATE_API_KEY") - if api_key is None: - raise EnvironmentError("No SUBSTRATE_API_KEY set") - return Path, api_key, mo, os, parent_dir, sys, typing_extensions - - -@app.cell -def __(api_key): - from substrate import ( - Substrate, - RemoveBackground, - StableDiffusionXLControlNet, - StableDiffusionXLInpaint, - GenerativeEditImage, - ) - - s = Substrate(api_key=api_key) - return ( - GenerativeEditImage, - RemoveBackground, - StableDiffusionXLControlNet, - StableDiffusionXLInpaint, - Substrate, - s, - ) - - -@app.cell -def __( - RemoveBackground, - StableDiffusionXLControlNet, - StableDiffusionXLInpaint, - mo, - s, -): - original = "https://media.substrate.run/logo-sq.png" - mask = RemoveBackground(image_uri=original, return_mask=True) - controlnet = StableDiffusionXLControlNet( - image_uri=original, - control_method="edge", - prompt="bright silver disco high contrast", - conditioning_scale=0.8, - num_images=1, - ) - inpaint = StableDiffusionXLInpaint( - image_uri=controlnet.future.outputs[0].image_uri, - mask_image_uri=mask.future.image_uri, - prompt="towers in the futuristic ancient solarpunk city of atlantis", - num_images=2, - ) - res = s.run(mask, controlnet, inpaint) - mo.tree(res.json) - return controlnet, inpaint, mask, original, res - - -@app.cell -def __(controlnet, mo, res): - mo.image(res.get(controlnet).outputs[0].image_uri) - return - - -@app.cell -def __(inpaint, mo, res): - mo.image(res.get(inpaint).outputs[0].image_uri) - return - - -@app.cell -def __(inpaint, mo, res): - mo.image(res.get(inpaint).outputs[1].image_uri) - return - - -@app.cell -def __(controlnet, inpaint, mo, res): - mo.hstack([ - mo.download(res.get(controlnet).outputs[0].image_uri), - mo.download(res.get(inpaint).outputs[0].image_uri), - mo.download(res.get(inpaint).outputs[1].image_uri), - ]) - return - - -if __name__ == "__main__": - app.run() diff --git a/examples/notebooks/poetry.lock b/examples/notebooks/poetry.lock deleted file mode 100644 index 77ab2ff..0000000 --- a/examples/notebooks/poetry.lock +++ /dev/null @@ -1,937 +0,0 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. - -[[package]] -name = "annotated-types" -version = "0.6.0" -description = "Reusable constraint types to use with typing.Annotated" -optional = false -python-versions = ">=3.8" -files = [ - {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"}, - {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, -] - -[[package]] -name = "anyio" -version = "4.3.0" -description = "High level compatibility layer for multiple asynchronous event loop implementations" -optional = false -python-versions = ">=3.8" -files = [ - {file = "anyio-4.3.0-py3-none-any.whl", hash = "sha256:048e05d0f6caeed70d731f3db756d35dcc1f35747c8c403364a8332c630441b8"}, - {file = "anyio-4.3.0.tar.gz", hash = "sha256:f75253795a87df48568485fd18cdd2a3fa5c4f7c5be8e5e36637733fce06fed6"}, -] - -[package.dependencies] -exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} -idna = ">=2.8" -sniffio = ">=1.1" -typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} - -[package.extras] -doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] -test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] -trio = ["trio (>=0.23)"] - -[[package]] -name = "beautifulsoup4" -version = "4.12.3" -description = "Screen-scraping library" -optional = false -python-versions = ">=3.6.0" -files = [ - {file = "beautifulsoup4-4.12.3-py3-none-any.whl", hash = "sha256:b80878c9f40111313e55da8ba20bdba06d8fa3969fc68304167741bbf9e082ed"}, - {file = "beautifulsoup4-4.12.3.tar.gz", hash = "sha256:74e3d1928edc070d21748185c46e3fb33490f22f52a3addee9aee0f4f7781051"}, -] - -[package.dependencies] -soupsieve = ">1.2" - -[package.extras] -cchardet = ["cchardet"] -chardet = ["chardet"] -charset-normalizer = ["charset-normalizer"] -html5lib = ["html5lib"] -lxml = ["lxml"] - -[[package]] -name = "black" -version = "24.4.2" -description = "The uncompromising code formatter." -optional = false -python-versions = ">=3.8" -files = [ - {file = "black-24.4.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dd1b5a14e417189db4c7b64a6540f31730713d173f0b63e55fabd52d61d8fdce"}, - {file = "black-24.4.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e537d281831ad0e71007dcdcbe50a71470b978c453fa41ce77186bbe0ed6021"}, - {file = "black-24.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eaea3008c281f1038edb473c1aa8ed8143a5535ff18f978a318f10302b254063"}, - {file = "black-24.4.2-cp310-cp310-win_amd64.whl", hash = "sha256:7768a0dbf16a39aa5e9a3ded568bb545c8c2727396d063bbaf847df05b08cd96"}, - {file = "black-24.4.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:257d724c2c9b1660f353b36c802ccece186a30accc7742c176d29c146df6e474"}, - {file = "black-24.4.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bdde6f877a18f24844e381d45e9947a49e97933573ac9d4345399be37621e26c"}, - {file = "black-24.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e151054aa00bad1f4e1f04919542885f89f5f7d086b8a59e5000e6c616896ffb"}, - {file = "black-24.4.2-cp311-cp311-win_amd64.whl", hash = "sha256:7e122b1c4fb252fd85df3ca93578732b4749d9be076593076ef4d07a0233c3e1"}, - {file = "black-24.4.2-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:accf49e151c8ed2c0cdc528691838afd217c50412534e876a19270fea1e28e2d"}, - {file = "black-24.4.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:88c57dc656038f1ab9f92b3eb5335ee9b021412feaa46330d5eba4e51fe49b04"}, - {file = "black-24.4.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be8bef99eb46d5021bf053114442914baeb3649a89dc5f3a555c88737e5e98fc"}, - {file = "black-24.4.2-cp312-cp312-win_amd64.whl", hash = "sha256:415e686e87dbbe6f4cd5ef0fbf764af7b89f9057b97c908742b6008cc554b9c0"}, - {file = "black-24.4.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:bf10f7310db693bb62692609b397e8d67257c55f949abde4c67f9cc574492cc7"}, - {file = "black-24.4.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:98e123f1d5cfd42f886624d84464f7756f60ff6eab89ae845210631714f6db94"}, - {file = "black-24.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:48a85f2cb5e6799a9ef05347b476cce6c182d6c71ee36925a6c194d074336ef8"}, - {file = "black-24.4.2-cp38-cp38-win_amd64.whl", hash = "sha256:b1530ae42e9d6d5b670a34db49a94115a64596bc77710b1d05e9801e62ca0a7c"}, - {file = "black-24.4.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:37aae07b029fa0174d39daf02748b379399b909652a806e5708199bd93899da1"}, - {file = "black-24.4.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:da33a1a5e49c4122ccdfd56cd021ff1ebc4a1ec4e2d01594fef9b6f267a9e741"}, - {file = "black-24.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ef703f83fc32e131e9bcc0a5094cfe85599e7109f896fe8bc96cc402f3eb4b6e"}, - {file = "black-24.4.2-cp39-cp39-win_amd64.whl", hash = "sha256:b9176b9832e84308818a99a561e90aa479e73c523b3f77afd07913380ae2eab7"}, - {file = "black-24.4.2-py3-none-any.whl", hash = "sha256:d36ed1124bb81b32f8614555b34cc4259c3fbc7eec17870e8ff8ded335b58d8c"}, - {file = "black-24.4.2.tar.gz", hash = "sha256:c872b53057f000085da66a19c55d68f6f8ddcac2642392ad3a355878406fbd4d"}, -] - -[package.dependencies] -click = ">=8.0.0" -mypy-extensions = ">=0.4.3" -packaging = ">=22.0" -pathspec = ">=0.9.0" -platformdirs = ">=2" -tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typing-extensions = {version = ">=4.0.1", markers = "python_version < \"3.11\""} - -[package.extras] -colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.7.4)", "aiohttp (>=3.7.4,!=3.9.0)"] -jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -uvloop = ["uvloop (>=0.15.2)"] - -[[package]] -name = "certifi" -version = "2024.2.2" -description = "Python package for providing Mozilla's CA Bundle." -optional = false -python-versions = ">=3.6" -files = [ - {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, - {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, -] - -[[package]] -name = "click" -version = "8.1.7" -description = "Composable command line interface toolkit" -optional = false -python-versions = ">=3.7" -files = [ - {file = "click-8.1.7-py3-none-any.whl", hash = "sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28"}, - {file = "click-8.1.7.tar.gz", hash = "sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "platform_system == \"Windows\""} - -[[package]] -name = "cloudpickle" -version = "3.0.0" -description = "Pickler class to extend the standard pickle.Pickler functionality" -optional = false -python-versions = ">=3.8" -files = [ - {file = "cloudpickle-3.0.0-py3-none-any.whl", hash = "sha256:246ee7d0c295602a036e86369c77fecda4ab17b506496730f2f576d9016fd9c7"}, - {file = "cloudpickle-3.0.0.tar.gz", hash = "sha256:996d9a482c6fb4f33c1a35335cf8afd065d2a56e973270364840712d9131a882"}, -] - -[[package]] -name = "colorama" -version = "0.4.6" -description = "Cross-platform colored terminal text." -optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" -files = [ - {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, - {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, -] - -[[package]] -name = "distro" -version = "1.9.0" -description = "Distro - an OS platform information API" -optional = false -python-versions = ">=3.6" -files = [ - {file = "distro-1.9.0-py3-none-any.whl", hash = "sha256:7bffd925d65168f85027d8da9af6bddab658135b840670a223589bc0c8ef02b2"}, - {file = "distro-1.9.0.tar.gz", hash = "sha256:2fa77c6fd8940f116ee1d6b94a2f90b13b5ea8d019b98bc8bafdcabcdd9bdbed"}, -] - -[[package]] -name = "docutils" -version = "0.21.2" -description = "Docutils -- Python Documentation Utilities" -optional = false -python-versions = ">=3.9" -files = [ - {file = "docutils-0.21.2-py3-none-any.whl", hash = "sha256:dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2"}, - {file = "docutils-0.21.2.tar.gz", hash = "sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f"}, -] - -[[package]] -name = "exceptiongroup" -version = "1.2.1" -description = "Backport of PEP 654 (exception groups)" -optional = false -python-versions = ">=3.7" -files = [ - {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, - {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, -] - -[package.extras] -test = ["pytest (>=6)"] - -[[package]] -name = "h11" -version = "0.14.0" -description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" -optional = false -python-versions = ">=3.7" -files = [ - {file = "h11-0.14.0-py3-none-any.whl", hash = "sha256:e3fe4ac4b851c468cc8363d500db52c2ead036020723024a109d37346efaa761"}, - {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, -] - -[[package]] -name = "httpcore" -version = "1.0.5" -description = "A minimal low-level HTTP client." -optional = false -python-versions = ">=3.8" -files = [ - {file = "httpcore-1.0.5-py3-none-any.whl", hash = "sha256:421f18bac248b25d310f3cacd198d55b8e6125c107797b609ff9b7a6ba7991b5"}, - {file = "httpcore-1.0.5.tar.gz", hash = "sha256:34a38e2f9291467ee3b44e89dd52615370e152954ba21721378a87b2960f7a61"}, -] - -[package.dependencies] -certifi = "*" -h11 = ">=0.13,<0.15" - -[package.extras] -asyncio = ["anyio (>=4.0,<5.0)"] -http2 = ["h2 (>=3,<5)"] -socks = ["socksio (==1.*)"] -trio = ["trio (>=0.22.0,<0.26.0)"] - -[[package]] -name = "httpx" -version = "0.27.0" -description = "The next generation HTTP client." -optional = false -python-versions = ">=3.8" -files = [ - {file = "httpx-0.27.0-py3-none-any.whl", hash = "sha256:71d5465162c13681bff01ad59b2cc68dd838ea1f10e51574bac27103f00c91a5"}, - {file = "httpx-0.27.0.tar.gz", hash = "sha256:a0cb88a46f32dc874e04ee956e4c2764aba2aa228f650b06788ba6bda2962ab5"}, -] - -[package.dependencies] -anyio = "*" -certifi = "*" -httpcore = "==1.*" -idna = "*" -sniffio = "*" - -[package.extras] -brotli = ["brotli", "brotlicffi"] -cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] -http2 = ["h2 (>=3,<5)"] -socks = ["socksio (==1.*)"] - -[[package]] -name = "httpx-sse" -version = "0.4.0" -description = "Consume Server-Sent Event (SSE) messages with HTTPX." -optional = false -python-versions = ">=3.8" -files = [ - {file = "httpx-sse-0.4.0.tar.gz", hash = "sha256:1e81a3a3070ce322add1d3529ed42eb5f70817f45ed6ec915ab753f961139721"}, - {file = "httpx_sse-0.4.0-py3-none-any.whl", hash = "sha256:f329af6eae57eaa2bdfd962b42524764af68075ea87370a2de920af5341e318f"}, -] - -[[package]] -name = "idna" -version = "3.7" -description = "Internationalized Domain Names in Applications (IDNA)" -optional = false -python-versions = ">=3.5" -files = [ - {file = "idna-3.7-py3-none-any.whl", hash = "sha256:82fee1fc78add43492d3a1898bfa6d8a904cc97d8427f683ed8e798d07761aa0"}, - {file = "idna-3.7.tar.gz", hash = "sha256:028ff3aadf0609c1fd278d8ea3089299412a7a8b9bd005dd08b9f8285bcb5cfc"}, -] - -[[package]] -name = "jedi" -version = "0.19.1" -description = "An autocompletion tool for Python that can be used for text editors." -optional = false -python-versions = ">=3.6" -files = [ - {file = "jedi-0.19.1-py2.py3-none-any.whl", hash = "sha256:e983c654fe5c02867aef4cdfce5a2fbb4a50adc0af145f70504238f18ef5e7e0"}, - {file = "jedi-0.19.1.tar.gz", hash = "sha256:cf0496f3651bc65d7174ac1b7d043eff454892c708a87d1b683e57b569927ffd"}, -] - -[package.dependencies] -parso = ">=0.8.3,<0.9.0" - -[package.extras] -docs = ["Jinja2 (==2.11.3)", "MarkupSafe (==1.1.1)", "Pygments (==2.8.1)", "alabaster (==0.7.12)", "babel (==2.9.1)", "chardet (==4.0.0)", "commonmark (==0.8.1)", "docutils (==0.17.1)", "future (==0.18.2)", "idna (==2.10)", "imagesize (==1.2.0)", "mock (==1.0.1)", "packaging (==20.9)", "pyparsing (==2.4.7)", "pytz (==2021.1)", "readthedocs-sphinx-ext (==2.1.4)", "recommonmark (==0.5.0)", "requests (==2.25.1)", "six (==1.15.0)", "snowballstemmer (==2.1.0)", "sphinx (==1.8.5)", "sphinx-rtd-theme (==0.4.3)", "sphinxcontrib-serializinghtml (==1.1.4)", "sphinxcontrib-websupport (==1.2.4)", "urllib3 (==1.26.4)"] -qa = ["flake8 (==5.0.4)", "mypy (==0.971)", "types-setuptools (==67.2.0.1)"] -testing = ["Django", "attrs", "colorama", "docopt", "pytest (<7.0.0)"] - -[[package]] -name = "marimo" -version = "0.3.12" -description = "A library for making reactive notebooks and apps" -optional = false -python-versions = ">=3.8" -files = [ - {file = "marimo-0.3.12-py3-none-any.whl", hash = "sha256:769720a49d9512372f7260bbb48390828eb42e253175d0b04b9b245a70f835ef"}, - {file = "marimo-0.3.12.tar.gz", hash = "sha256:e0ec1363838591341c42a1e7b6371fc0f4f1e30fb618f114072fd7816fe70135"}, -] - -[package.dependencies] -black = "*" -click = ">=8.0,<9" -docutils = ">=0.17.0" -jedi = ">=0.18.0" -markdown = ">=3.4,<4" -pygments = ">=2.13,<3" -pymdown-extensions = ">=9.0,<11" -starlette = ">=0.26.1,<0.36.0 || >0.36.0" -tomlkit = ">=0.12.0" -typing-extensions = {version = ">=4.4.0", markers = "python_version < \"3.11\""} -uvicorn = ">=0.22.0" -websockets = ">=10.0.0,<13.0.0" - -[package.extras] -dev = ["autoclasstoc (>=1.6.0,<1.7.0)", "black (>=23.3.0,<23.4.0)", "build (>=0.10.0,<0.11.0)", "click (<8.1.4)", "furo (==2023.5.20)", "httpx (>=0.26.0,<0.27.0)", "mypy (>=1.7.0,<1.8.0)", "myst-parser (>=2.0.0,<2.1.0)", "pandas (>=1.3.0)", "pandas-stubs (>=1.3.0)", "pillow (>=10.2.0,<10.3.0)", "polars (==0.19.12)", "pyarrow (>=15.0.2,<16)", "pyarrow-stubs (>=10)", "pypandoc (>=1.11,<2.0)", "pytest (>=7.4.0,<7.5.0)", "pytest-asyncio (>=0.23.4,<0.24.0)", "pytest-codecov (>=0.5.1,<0.6.0)", "ruff (>=0.0.275,<0.1.0)", "sphinx (==7.0.1)", "sphinx-copybutton (>=0.5.2,<0.6.0)", "sphinx-design (>=0.5.0,<0.6.0)", "sphinx-new-tab-link (>=0.1.1,<0.2.0)", "sphinx-sitemap (>=2.5.1,<2.6.0)", "types-Pillow (>=10.2.0.20240311,<10.3.0.0)", "typos (>=1.17.1,<1.18.0)"] -testcore = ["click (<8.1.4)", "httpx (>=0.26.0,<0.27.0)", "pytest (>=7.4.0,<7.5.0)", "pytest-asyncio (>=0.23.4,<0.24.0)", "pytest-codecov (>=0.5.1,<0.6.0)"] -testoptional = ["altair (>=5.0.0)", "anywidget (>=0.9.3,<0.10.0)", "ipython (>=8.12.3,<8.13.0)", "openai (>=1.12.0,<1.13.0)", "pandas (>=1.3.0)", "pandas-stubs (>=1.3.0)", "pillow (>=10.2.0,<10.3.0)", "polars (==0.19.12)", "pyarrow (>=15.0.2,<16)", "pyarrow-stubs (>=10)", "types-Pillow (>=10.2.0.20240311,<10.3.0.0)"] - -[[package]] -name = "markdown" -version = "3.6" -description = "Python implementation of John Gruber's Markdown." -optional = false -python-versions = ">=3.8" -files = [ - {file = "Markdown-3.6-py3-none-any.whl", hash = "sha256:48f276f4d8cfb8ce6527c8f79e2ee29708508bf4d40aa410fbc3b4ee832c850f"}, - {file = "Markdown-3.6.tar.gz", hash = "sha256:ed4f41f6daecbeeb96e576ce414c41d2d876daa9a16cb35fa8ed8c2ddfad0224"}, -] - -[package.extras] -docs = ["mdx-gh-links (>=0.2)", "mkdocs (>=1.5)", "mkdocs-gen-files", "mkdocs-literate-nav", "mkdocs-nature (>=0.6)", "mkdocs-section-index", "mkdocstrings[python]"] -testing = ["coverage", "pyyaml"] - -[[package]] -name = "mypy-extensions" -version = "1.0.0" -description = "Type system extensions for programs checked with the mypy type checker." -optional = false -python-versions = ">=3.5" -files = [ - {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, - {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, -] - -[[package]] -name = "networkx" -version = "3.3" -description = "Python package for creating and manipulating graphs and networks" -optional = false -python-versions = ">=3.10" -files = [ - {file = "networkx-3.3-py3-none-any.whl", hash = "sha256:28575580c6ebdaf4505b22c6256a2b9de86b316dc63ba9e93abde3d78dfdbcf2"}, - {file = "networkx-3.3.tar.gz", hash = "sha256:0c127d8b2f4865f59ae9cb8aafcd60b5c70f3241ebd66f7defad7c4ab90126c9"}, -] - -[package.extras] -default = ["matplotlib (>=3.6)", "numpy (>=1.23)", "pandas (>=1.4)", "scipy (>=1.9,!=1.11.0,!=1.11.1)"] -developer = ["changelist (==0.5)", "mypy (>=1.1)", "pre-commit (>=3.2)", "rtoml"] -doc = ["myst-nb (>=1.0)", "numpydoc (>=1.7)", "pillow (>=9.4)", "pydata-sphinx-theme (>=0.14)", "sphinx (>=7)", "sphinx-gallery (>=0.14)", "texext (>=0.6.7)"] -extra = ["lxml (>=4.6)", "pydot (>=2.0)", "pygraphviz (>=1.12)", "sympy (>=1.10)"] -test = ["pytest (>=7.2)", "pytest-cov (>=4.0)"] - -[[package]] -name = "openai" -version = "1.25.0" -description = "The official Python library for the openai API" -optional = false -python-versions = ">=3.7.1" -files = [ - {file = "openai-1.25.0-py3-none-any.whl", hash = "sha256:d0cfdf6afb31a5dabf3b95966cb31f3c757a0edaf3228715409cb404b9933de0"}, - {file = "openai-1.25.0.tar.gz", hash = "sha256:22c35b26b8281cd2759b1a4c05ac99e2f2b26a9df71f90a0b4ddb75aa27adc81"}, -] - -[package.dependencies] -anyio = ">=3.5.0,<5" -distro = ">=1.7.0,<2" -httpx = ">=0.23.0,<1" -pydantic = ">=1.9.0,<3" -sniffio = "*" -tqdm = ">4" -typing-extensions = ">=4.7,<5" - -[package.extras] -datalib = ["numpy (>=1)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)"] - -[[package]] -name = "packaging" -version = "24.0" -description = "Core utilities for Python packages" -optional = false -python-versions = ">=3.7" -files = [ - {file = "packaging-24.0-py3-none-any.whl", hash = "sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5"}, - {file = "packaging-24.0.tar.gz", hash = "sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9"}, -] - -[[package]] -name = "parso" -version = "0.8.4" -description = "A Python Parser" -optional = false -python-versions = ">=3.6" -files = [ - {file = "parso-0.8.4-py2.py3-none-any.whl", hash = "sha256:a418670a20291dacd2dddc80c377c5c3791378ee1e8d12bffc35420643d43f18"}, - {file = "parso-0.8.4.tar.gz", hash = "sha256:eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d"}, -] - -[package.extras] -qa = ["flake8 (==5.0.4)", "mypy (==0.971)", "types-setuptools (==67.2.0.1)"] -testing = ["docopt", "pytest"] - -[[package]] -name = "pathspec" -version = "0.12.1" -description = "Utility library for gitignore style pattern matching of file paths." -optional = false -python-versions = ">=3.8" -files = [ - {file = "pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08"}, - {file = "pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712"}, -] - -[[package]] -name = "pillow" -version = "10.3.0" -description = "Python Imaging Library (Fork)" -optional = false -python-versions = ">=3.8" -files = [ - {file = "pillow-10.3.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:90b9e29824800e90c84e4022dd5cc16eb2d9605ee13f05d47641eb183cd73d45"}, - {file = "pillow-10.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a2c405445c79c3f5a124573a051062300936b0281fee57637e706453e452746c"}, - {file = "pillow-10.3.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:78618cdbccaa74d3f88d0ad6cb8ac3007f1a6fa5c6f19af64b55ca170bfa1edf"}, - {file = "pillow-10.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:261ddb7ca91fcf71757979534fb4c128448b5b4c55cb6152d280312062f69599"}, - {file = "pillow-10.3.0-cp310-cp310-manylinux_2_28_aarch64.whl", hash = "sha256:ce49c67f4ea0609933d01c0731b34b8695a7a748d6c8d186f95e7d085d2fe475"}, - {file = "pillow-10.3.0-cp310-cp310-manylinux_2_28_x86_64.whl", hash = "sha256:b14f16f94cbc61215115b9b1236f9c18403c15dd3c52cf629072afa9d54c1cbf"}, - {file = "pillow-10.3.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d33891be6df59d93df4d846640f0e46f1a807339f09e79a8040bc887bdcd7ed3"}, - {file = "pillow-10.3.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b50811d664d392f02f7761621303eba9d1b056fb1868c8cdf4231279645c25f5"}, - {file = "pillow-10.3.0-cp310-cp310-win32.whl", hash = "sha256:ca2870d5d10d8726a27396d3ca4cf7976cec0f3cb706debe88e3a5bd4610f7d2"}, - {file = "pillow-10.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:f0d0591a0aeaefdaf9a5e545e7485f89910c977087e7de2b6c388aec32011e9f"}, - {file = "pillow-10.3.0-cp310-cp310-win_arm64.whl", hash = "sha256:ccce24b7ad89adb5a1e34a6ba96ac2530046763912806ad4c247356a8f33a67b"}, - {file = "pillow-10.3.0-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:5f77cf66e96ae734717d341c145c5949c63180842a545c47a0ce7ae52ca83795"}, - {file = "pillow-10.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e4b878386c4bf293578b48fc570b84ecfe477d3b77ba39a6e87150af77f40c57"}, - {file = "pillow-10.3.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fdcbb4068117dfd9ce0138d068ac512843c52295ed996ae6dd1faf537b6dbc27"}, - {file = "pillow-10.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9797a6c8fe16f25749b371c02e2ade0efb51155e767a971c61734b1bf6293994"}, - {file = "pillow-10.3.0-cp311-cp311-manylinux_2_28_aarch64.whl", hash = "sha256:9e91179a242bbc99be65e139e30690e081fe6cb91a8e77faf4c409653de39451"}, - {file = "pillow-10.3.0-cp311-cp311-manylinux_2_28_x86_64.whl", hash = "sha256:1b87bd9d81d179bd8ab871603bd80d8645729939f90b71e62914e816a76fc6bd"}, - {file = "pillow-10.3.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:81d09caa7b27ef4e61cb7d8fbf1714f5aec1c6b6c5270ee53504981e6e9121ad"}, - {file = "pillow-10.3.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:048ad577748b9fa4a99a0548c64f2cb8d672d5bf2e643a739ac8faff1164238c"}, - {file = "pillow-10.3.0-cp311-cp311-win32.whl", hash = "sha256:7161ec49ef0800947dc5570f86568a7bb36fa97dd09e9827dc02b718c5643f09"}, - {file = "pillow-10.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:8eb0908e954d093b02a543dc963984d6e99ad2b5e36503d8a0aaf040505f747d"}, - {file = "pillow-10.3.0-cp311-cp311-win_arm64.whl", hash = "sha256:4e6f7d1c414191c1199f8996d3f2282b9ebea0945693fb67392c75a3a320941f"}, - {file = "pillow-10.3.0-cp312-cp312-macosx_10_10_x86_64.whl", hash = "sha256:e46f38133e5a060d46bd630faa4d9fa0202377495df1f068a8299fd78c84de84"}, - {file = "pillow-10.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:50b8eae8f7334ec826d6eeffaeeb00e36b5e24aa0b9df322c247539714c6df19"}, - {file = "pillow-10.3.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9d3bea1c75f8c53ee4d505c3e67d8c158ad4df0d83170605b50b64025917f338"}, - {file = "pillow-10.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:19aeb96d43902f0a783946a0a87dbdad5c84c936025b8419da0a0cd7724356b1"}, - {file = "pillow-10.3.0-cp312-cp312-manylinux_2_28_aarch64.whl", hash = "sha256:74d28c17412d9caa1066f7a31df8403ec23d5268ba46cd0ad2c50fb82ae40462"}, - {file = "pillow-10.3.0-cp312-cp312-manylinux_2_28_x86_64.whl", hash = "sha256:ff61bfd9253c3915e6d41c651d5f962da23eda633cf02262990094a18a55371a"}, - {file = "pillow-10.3.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:d886f5d353333b4771d21267c7ecc75b710f1a73d72d03ca06df49b09015a9ef"}, - {file = "pillow-10.3.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4b5ec25d8b17217d635f8935dbc1b9aa5907962fae29dff220f2659487891cd3"}, - {file = "pillow-10.3.0-cp312-cp312-win32.whl", hash = "sha256:51243f1ed5161b9945011a7360e997729776f6e5d7005ba0c6879267d4c5139d"}, - {file = "pillow-10.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:412444afb8c4c7a6cc11a47dade32982439925537e483be7c0ae0cf96c4f6a0b"}, - {file = "pillow-10.3.0-cp312-cp312-win_arm64.whl", hash = "sha256:798232c92e7665fe82ac085f9d8e8ca98826f8e27859d9a96b41d519ecd2e49a"}, - {file = "pillow-10.3.0-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:4eaa22f0d22b1a7e93ff0a596d57fdede2e550aecffb5a1ef1106aaece48e96b"}, - {file = "pillow-10.3.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cd5e14fbf22a87321b24c88669aad3a51ec052eb145315b3da3b7e3cc105b9a2"}, - {file = "pillow-10.3.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1530e8f3a4b965eb6a7785cf17a426c779333eb62c9a7d1bbcf3ffd5bf77a4aa"}, - {file = "pillow-10.3.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d512aafa1d32efa014fa041d38868fda85028e3f930a96f85d49c7d8ddc0383"}, - {file = "pillow-10.3.0-cp38-cp38-manylinux_2_28_aarch64.whl", hash = "sha256:339894035d0ede518b16073bdc2feef4c991ee991a29774b33e515f1d308e08d"}, - {file = "pillow-10.3.0-cp38-cp38-manylinux_2_28_x86_64.whl", hash = "sha256:aa7e402ce11f0885305bfb6afb3434b3cd8f53b563ac065452d9d5654c7b86fd"}, - {file = "pillow-10.3.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:0ea2a783a2bdf2a561808fe4a7a12e9aa3799b701ba305de596bc48b8bdfce9d"}, - {file = "pillow-10.3.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c78e1b00a87ce43bb37642c0812315b411e856a905d58d597750eb79802aaaa3"}, - {file = "pillow-10.3.0-cp38-cp38-win32.whl", hash = "sha256:72d622d262e463dfb7595202d229f5f3ab4b852289a1cd09650362db23b9eb0b"}, - {file = "pillow-10.3.0-cp38-cp38-win_amd64.whl", hash = "sha256:2034f6759a722da3a3dbd91a81148cf884e91d1b747992ca288ab88c1de15999"}, - {file = "pillow-10.3.0-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:2ed854e716a89b1afcedea551cd85f2eb2a807613752ab997b9974aaa0d56936"}, - {file = "pillow-10.3.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:dc1a390a82755a8c26c9964d457d4c9cbec5405896cba94cf51f36ea0d855002"}, - {file = "pillow-10.3.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4203efca580f0dd6f882ca211f923168548f7ba334c189e9eab1178ab840bf60"}, - {file = "pillow-10.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3102045a10945173d38336f6e71a8dc71bcaeed55c3123ad4af82c52807b9375"}, - {file = "pillow-10.3.0-cp39-cp39-manylinux_2_28_aarch64.whl", hash = "sha256:6fb1b30043271ec92dc65f6d9f0b7a830c210b8a96423074b15c7bc999975f57"}, - {file = "pillow-10.3.0-cp39-cp39-manylinux_2_28_x86_64.whl", hash = "sha256:1dfc94946bc60ea375cc39cff0b8da6c7e5f8fcdc1d946beb8da5c216156ddd8"}, - {file = "pillow-10.3.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b09b86b27a064c9624d0a6c54da01c1beaf5b6cadfa609cf63789b1d08a797b9"}, - {file = "pillow-10.3.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:d3b2348a78bc939b4fed6552abfd2e7988e0f81443ef3911a4b8498ca084f6eb"}, - {file = "pillow-10.3.0-cp39-cp39-win32.whl", hash = "sha256:45ebc7b45406febf07fef35d856f0293a92e7417ae7933207e90bf9090b70572"}, - {file = "pillow-10.3.0-cp39-cp39-win_amd64.whl", hash = "sha256:0ba26351b137ca4e0db0342d5d00d2e355eb29372c05afd544ebf47c0956ffeb"}, - {file = "pillow-10.3.0-cp39-cp39-win_arm64.whl", hash = "sha256:50fd3f6b26e3441ae07b7c979309638b72abc1a25da31a81a7fbd9495713ef4f"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-macosx_10_10_x86_64.whl", hash = "sha256:6b02471b72526ab8a18c39cb7967b72d194ec53c1fd0a70b050565a0f366d355"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:8ab74c06ffdab957d7670c2a5a6e1a70181cd10b727cd788c4dd9005b6a8acd9"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:048eeade4c33fdf7e08da40ef402e748df113fd0b4584e32c4af74fe78baaeb2"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e2ec1e921fd07c7cda7962bad283acc2f2a9ccc1b971ee4b216b75fad6f0463"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:4c8e73e99da7db1b4cad7f8d682cf6abad7844da39834c288fbfa394a47bbced"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:16563993329b79513f59142a6b02055e10514c1a8e86dca8b48a893e33cf91e3"}, - {file = "pillow-10.3.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:dd78700f5788ae180b5ee8902c6aea5a5726bac7c364b202b4b3e3ba2d293170"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:aff76a55a8aa8364d25400a210a65ff59d0168e0b4285ba6bf2bd83cf675ba32"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:b7bc2176354defba3edc2b9a777744462da2f8e921fbaf61e52acb95bafa9828"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:793b4e24db2e8742ca6423d3fde8396db336698c55cd34b660663ee9e45ed37f"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d93480005693d247f8346bc8ee28c72a2191bdf1f6b5db469c096c0c867ac015"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c83341b89884e2b2e55886e8fbbf37c3fa5efd6c8907124aeb72f285ae5696e5"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:1a1d1915db1a4fdb2754b9de292642a39a7fb28f1736699527bb649484fb966a"}, - {file = "pillow-10.3.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a0eaa93d054751ee9964afa21c06247779b90440ca41d184aeb5d410f20ff591"}, - {file = "pillow-10.3.0.tar.gz", hash = "sha256:9d2455fbf44c914840c793e89aa82d0e1763a14253a000743719ae5946814b2d"}, -] - -[package.extras] -docs = ["furo", "olefile", "sphinx (>=2.4)", "sphinx-copybutton", "sphinx-inline-tabs", "sphinx-removed-in", "sphinxext-opengraph"] -fpx = ["olefile"] -mic = ["olefile"] -tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout"] -typing = ["typing-extensions"] -xmp = ["defusedxml"] - -[[package]] -name = "platformdirs" -version = "4.2.1" -description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." -optional = false -python-versions = ">=3.8" -files = [ - {file = "platformdirs-4.2.1-py3-none-any.whl", hash = "sha256:17d5a1161b3fd67b390023cb2d3b026bbd40abde6fdb052dfbd3a29c3ba22ee1"}, - {file = "platformdirs-4.2.1.tar.gz", hash = "sha256:031cd18d4ec63ec53e82dceaac0417d218a6863f7745dfcc9efe7793b7039bdf"}, -] - -[package.extras] -docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] -test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] -type = ["mypy (>=1.8)"] - -[[package]] -name = "pydantic" -version = "2.7.1" -description = "Data validation using Python type hints" -optional = false -python-versions = ">=3.8" -files = [ - {file = "pydantic-2.7.1-py3-none-any.whl", hash = "sha256:e029badca45266732a9a79898a15ae2e8b14840b1eabbb25844be28f0b33f3d5"}, - {file = "pydantic-2.7.1.tar.gz", hash = "sha256:e9dbb5eada8abe4d9ae5f46b9939aead650cd2b68f249bb3a8139dbe125803cc"}, -] - -[package.dependencies] -annotated-types = ">=0.4.0" -pydantic-core = "2.18.2" -typing-extensions = ">=4.6.1" - -[package.extras] -email = ["email-validator (>=2.0.0)"] - -[[package]] -name = "pydantic-core" -version = "2.18.2" -description = "Core functionality for Pydantic validation and serialization" -optional = false -python-versions = ">=3.8" -files = [ - {file = "pydantic_core-2.18.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:9e08e867b306f525802df7cd16c44ff5ebbe747ff0ca6cf3fde7f36c05a59a81"}, - {file = "pydantic_core-2.18.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f0a21cbaa69900cbe1a2e7cad2aa74ac3cf21b10c3efb0fa0b80305274c0e8a2"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0680b1f1f11fda801397de52c36ce38ef1c1dc841a0927a94f226dea29c3ae3d"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:95b9d5e72481d3780ba3442eac863eae92ae43a5f3adb5b4d0a1de89d42bb250"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4fcf5cd9c4b655ad666ca332b9a081112cd7a58a8b5a6ca7a3104bc950f2038"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9b5155ff768083cb1d62f3e143b49a8a3432e6789a3abee8acd005c3c7af1c74"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:553ef617b6836fc7e4df130bb851e32fe357ce36336d897fd6646d6058d980af"}, - {file = "pydantic_core-2.18.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b89ed9eb7d616ef5714e5590e6cf7f23b02d0d539767d33561e3675d6f9e3857"}, - {file = "pydantic_core-2.18.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:75f7e9488238e920ab6204399ded280dc4c307d034f3924cd7f90a38b1829563"}, - {file = "pydantic_core-2.18.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ef26c9e94a8c04a1b2924149a9cb081836913818e55681722d7f29af88fe7b38"}, - {file = "pydantic_core-2.18.2-cp310-none-win32.whl", hash = "sha256:182245ff6b0039e82b6bb585ed55a64d7c81c560715d1bad0cbad6dfa07b4027"}, - {file = "pydantic_core-2.18.2-cp310-none-win_amd64.whl", hash = "sha256:e23ec367a948b6d812301afc1b13f8094ab7b2c280af66ef450efc357d2ae543"}, - {file = "pydantic_core-2.18.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:219da3f096d50a157f33645a1cf31c0ad1fe829a92181dd1311022f986e5fbe3"}, - {file = "pydantic_core-2.18.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:cc1cfd88a64e012b74e94cd00bbe0f9c6df57049c97f02bb07d39e9c852e19a4"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:05b7133a6e6aeb8df37d6f413f7705a37ab4031597f64ab56384c94d98fa0e90"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:224c421235f6102e8737032483f43c1a8cfb1d2f45740c44166219599358c2cd"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b14d82cdb934e99dda6d9d60dc84a24379820176cc4a0d123f88df319ae9c150"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2728b01246a3bba6de144f9e3115b532ee44bd6cf39795194fb75491824a1413"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:470b94480bb5ee929f5acba6995251ada5e059a5ef3e0dfc63cca287283ebfa6"}, - {file = "pydantic_core-2.18.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:997abc4df705d1295a42f95b4eec4950a37ad8ae46d913caeee117b6b198811c"}, - {file = "pydantic_core-2.18.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:75250dbc5290e3f1a0f4618db35e51a165186f9034eff158f3d490b3fed9f8a0"}, - {file = "pydantic_core-2.18.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:4456f2dca97c425231d7315737d45239b2b51a50dc2b6f0c2bb181fce6207664"}, - {file = "pydantic_core-2.18.2-cp311-none-win32.whl", hash = "sha256:269322dcc3d8bdb69f054681edff86276b2ff972447863cf34c8b860f5188e2e"}, - {file = "pydantic_core-2.18.2-cp311-none-win_amd64.whl", hash = "sha256:800d60565aec896f25bc3cfa56d2277d52d5182af08162f7954f938c06dc4ee3"}, - {file = "pydantic_core-2.18.2-cp311-none-win_arm64.whl", hash = "sha256:1404c69d6a676245199767ba4f633cce5f4ad4181f9d0ccb0577e1f66cf4c46d"}, - {file = "pydantic_core-2.18.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:fb2bd7be70c0fe4dfd32c951bc813d9fe6ebcbfdd15a07527796c8204bd36242"}, - {file = "pydantic_core-2.18.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6132dd3bd52838acddca05a72aafb6eab6536aa145e923bb50f45e78b7251043"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d7d904828195733c183d20a54230c0df0eb46ec746ea1a666730787353e87182"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c9bd70772c720142be1020eac55f8143a34ec9f82d75a8e7a07852023e46617f"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2b8ed04b3582771764538f7ee7001b02e1170223cf9b75dff0bc698fadb00cf3"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e6dac87ddb34aaec85f873d737e9d06a3555a1cc1a8e0c44b7f8d5daeb89d86f"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7ca4ae5a27ad7a4ee5170aebce1574b375de390bc01284f87b18d43a3984df72"}, - {file = "pydantic_core-2.18.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:886eec03591b7cf058467a70a87733b35f44707bd86cf64a615584fd72488b7c"}, - {file = "pydantic_core-2.18.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:ca7b0c1f1c983e064caa85f3792dd2fe3526b3505378874afa84baf662e12241"}, - {file = "pydantic_core-2.18.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4b4356d3538c3649337df4074e81b85f0616b79731fe22dd11b99499b2ebbdf3"}, - {file = "pydantic_core-2.18.2-cp312-none-win32.whl", hash = "sha256:8b172601454f2d7701121bbec3425dd71efcb787a027edf49724c9cefc14c038"}, - {file = "pydantic_core-2.18.2-cp312-none-win_amd64.whl", hash = "sha256:b1bd7e47b1558ea872bd16c8502c414f9e90dcf12f1395129d7bb42a09a95438"}, - {file = "pydantic_core-2.18.2-cp312-none-win_arm64.whl", hash = "sha256:98758d627ff397e752bc339272c14c98199c613f922d4a384ddc07526c86a2ec"}, - {file = "pydantic_core-2.18.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:9fdad8e35f278b2c3eb77cbdc5c0a49dada440657bf738d6905ce106dc1de439"}, - {file = "pydantic_core-2.18.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:1d90c3265ae107f91a4f279f4d6f6f1d4907ac76c6868b27dc7fb33688cfb347"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:390193c770399861d8df9670fb0d1874f330c79caaca4642332df7c682bf6b91"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:82d5d4d78e4448683cb467897fe24e2b74bb7b973a541ea1dcfec1d3cbce39fb"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4774f3184d2ef3e14e8693194f661dea5a4d6ca4e3dc8e39786d33a94865cefd"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d4d938ec0adf5167cb335acb25a4ee69a8107e4984f8fbd2e897021d9e4ca21b"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e0e8b1be28239fc64a88a8189d1df7fad8be8c1ae47fcc33e43d4be15f99cc70"}, - {file = "pydantic_core-2.18.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:868649da93e5a3d5eacc2b5b3b9235c98ccdbfd443832f31e075f54419e1b96b"}, - {file = "pydantic_core-2.18.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:78363590ef93d5d226ba21a90a03ea89a20738ee5b7da83d771d283fd8a56761"}, - {file = "pydantic_core-2.18.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:852e966fbd035a6468fc0a3496589b45e2208ec7ca95c26470a54daed82a0788"}, - {file = "pydantic_core-2.18.2-cp38-none-win32.whl", hash = "sha256:6a46e22a707e7ad4484ac9ee9f290f9d501df45954184e23fc29408dfad61350"}, - {file = "pydantic_core-2.18.2-cp38-none-win_amd64.whl", hash = "sha256:d91cb5ea8b11607cc757675051f61b3d93f15eca3cefb3e6c704a5d6e8440f4e"}, - {file = "pydantic_core-2.18.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:ae0a8a797a5e56c053610fa7be147993fe50960fa43609ff2a9552b0e07013e8"}, - {file = "pydantic_core-2.18.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:042473b6280246b1dbf530559246f6842b56119c2926d1e52b631bdc46075f2a"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1a388a77e629b9ec814c1b1e6b3b595fe521d2cdc625fcca26fbc2d44c816804"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e25add29b8f3b233ae90ccef2d902d0ae0432eb0d45370fe315d1a5cf231004b"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f459a5ce8434614dfd39bbebf1041952ae01da6bed9855008cb33b875cb024c0"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:eff2de745698eb46eeb51193a9f41d67d834d50e424aef27df2fcdee1b153845"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8309f67285bdfe65c372ea3722b7a5642680f3dba538566340a9d36e920b5f0"}, - {file = "pydantic_core-2.18.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f93a8a2e3938ff656a7c1bc57193b1319960ac015b6e87d76c76bf14fe0244b4"}, - {file = "pydantic_core-2.18.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:22057013c8c1e272eb8d0eebc796701167d8377441ec894a8fed1af64a0bf399"}, - {file = "pydantic_core-2.18.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:cfeecd1ac6cc1fb2692c3d5110781c965aabd4ec5d32799773ca7b1456ac636b"}, - {file = "pydantic_core-2.18.2-cp39-none-win32.whl", hash = "sha256:0d69b4c2f6bb3e130dba60d34c0845ba31b69babdd3f78f7c0c8fae5021a253e"}, - {file = "pydantic_core-2.18.2-cp39-none-win_amd64.whl", hash = "sha256:d9319e499827271b09b4e411905b24a426b8fb69464dfa1696258f53a3334641"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:a1874c6dd4113308bd0eb568418e6114b252afe44319ead2b4081e9b9521fe75"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:ccdd111c03bfd3666bd2472b674c6899550e09e9f298954cfc896ab92b5b0e6d"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e18609ceaa6eed63753037fc06ebb16041d17d28199ae5aba0052c51449650a9"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e5c584d357c4e2baf0ff7baf44f4994be121e16a2c88918a5817331fc7599d7"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:43f0f463cf89ace478de71a318b1b4f05ebc456a9b9300d027b4b57c1a2064fb"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:e1b395e58b10b73b07b7cf740d728dd4ff9365ac46c18751bf8b3d8cca8f625a"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:0098300eebb1c837271d3d1a2cd2911e7c11b396eac9661655ee524a7f10587b"}, - {file = "pydantic_core-2.18.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:36789b70d613fbac0a25bb07ab3d9dba4d2e38af609c020cf4d888d165ee0bf3"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:3f9a801e7c8f1ef8718da265bba008fa121243dfe37c1cea17840b0944dfd72c"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:3a6515ebc6e69d85502b4951d89131ca4e036078ea35533bb76327f8424531ce"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:20aca1e2298c56ececfd8ed159ae4dde2df0781988c97ef77d5c16ff4bd5b400"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:223ee893d77a310a0391dca6df00f70bbc2f36a71a895cecd9a0e762dc37b349"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2334ce8c673ee93a1d6a65bd90327588387ba073c17e61bf19b4fd97d688d63c"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:cbca948f2d14b09d20268cda7b0367723d79063f26c4ffc523af9042cad95592"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:b3ef08e20ec49e02d5c6717a91bb5af9b20f1805583cb0adfe9ba2c6b505b5ae"}, - {file = "pydantic_core-2.18.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:c6fdc8627910eed0c01aed6a390a252fe3ea6d472ee70fdde56273f198938374"}, - {file = "pydantic_core-2.18.2.tar.gz", hash = "sha256:2e29d20810dfc3043ee13ac7d9e25105799817683348823f305ab3f349b9386e"}, -] - -[package.dependencies] -typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" - -[[package]] -name = "pygments" -version = "2.17.2" -description = "Pygments is a syntax highlighting package written in Python." -optional = false -python-versions = ">=3.7" -files = [ - {file = "pygments-2.17.2-py3-none-any.whl", hash = "sha256:b27c2826c47d0f3219f29554824c30c5e8945175d888647acd804ddd04af846c"}, - {file = "pygments-2.17.2.tar.gz", hash = "sha256:da46cec9fd2de5be3a8a784f434e4c4ab670b4ff54d605c4c2717e9d49c4c367"}, -] - -[package.extras] -plugins = ["importlib-metadata"] -windows-terminal = ["colorama (>=0.4.6)"] - -[[package]] -name = "pymdown-extensions" -version = "10.8.1" -description = "Extension pack for Python Markdown." -optional = false -python-versions = ">=3.8" -files = [ - {file = "pymdown_extensions-10.8.1-py3-none-any.whl", hash = "sha256:f938326115884f48c6059c67377c46cf631c733ef3629b6eed1349989d1b30cb"}, - {file = "pymdown_extensions-10.8.1.tar.gz", hash = "sha256:3ab1db5c9e21728dabf75192d71471f8e50f216627e9a1fa9535ecb0231b9940"}, -] - -[package.dependencies] -markdown = ">=3.6" -pyyaml = "*" - -[package.extras] -extra = ["pygments (>=2.12)"] - -[[package]] -name = "pyyaml" -version = "6.0.1" -description = "YAML parser and emitter for Python" -optional = false -python-versions = ">=3.6" -files = [ - {file = "PyYAML-6.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a"}, - {file = "PyYAML-6.0.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, - {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, - {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, - {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, - {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, - {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, - {file = "PyYAML-6.0.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, - {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, - {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, - {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, - {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, - {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, - {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"}, - {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, - {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, - {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, - {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, - {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, - {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd"}, - {file = "PyYAML-6.0.1-cp36-cp36m-win32.whl", hash = "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585"}, - {file = "PyYAML-6.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa"}, - {file = "PyYAML-6.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3"}, - {file = "PyYAML-6.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c"}, - {file = "PyYAML-6.0.1-cp37-cp37m-win32.whl", hash = "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba"}, - {file = "PyYAML-6.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867"}, - {file = "PyYAML-6.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, - {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, - {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, - {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, - {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, - {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, - {file = "PyYAML-6.0.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, - {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, - {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, - {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, - {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, - {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, -] - -[[package]] -name = "sniffio" -version = "1.3.1" -description = "Sniff out which async library your code is running under" -optional = false -python-versions = ">=3.7" -files = [ - {file = "sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2"}, - {file = "sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc"}, -] - -[[package]] -name = "soupsieve" -version = "2.5" -description = "A modern CSS selector implementation for Beautiful Soup." -optional = false -python-versions = ">=3.8" -files = [ - {file = "soupsieve-2.5-py3-none-any.whl", hash = "sha256:eaa337ff55a1579b6549dc679565eac1e3d000563bcb1c8ab0d0fefbc0c2cdc7"}, - {file = "soupsieve-2.5.tar.gz", hash = "sha256:5663d5a7b3bfaeee0bc4372e7fc48f9cff4940b3eec54a6451cc5299f1097690"}, -] - -[[package]] -name = "starlette" -version = "0.37.2" -description = "The little ASGI library that shines." -optional = false -python-versions = ">=3.8" -files = [ - {file = "starlette-0.37.2-py3-none-any.whl", hash = "sha256:6fe59f29268538e5d0d182f2791a479a0c64638e6935d1c6989e63fb2699c6ee"}, - {file = "starlette-0.37.2.tar.gz", hash = "sha256:9af890290133b79fc3db55474ade20f6220a364a0402e0b556e7cd5e1e093823"}, -] - -[package.dependencies] -anyio = ">=3.4.0,<5" - -[package.extras] -full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart (>=0.0.7)", "pyyaml"] - -[[package]] -name = "substrate" -version = "220240617.0.1" -description = "Substrate Python SDK" -optional = false -python-versions = ">=3.9" -files = [ - {file = "substrate-220240617.0.1-py3-none-any.whl", hash = "sha256:f3920487e282b37219de42f56aa99bfc96d51be7e1dbf6ef27662e195e4328c6"}, - {file = "substrate-220240617.0.1.tar.gz", hash = "sha256:8ab5faeaeb66443a6d87c00dcf49a4af3ce06864f22f162840685b790d925545"}, -] - -[package.dependencies] -cloudpickle = "3.0.0" -distro = ">=1.8.0" -httpx = ">=0.26.0" -httpx-sse = ">=0.4.0,<0.5.0" -networkx = ">=3.2.1" -pydantic = ">=1.0.0" -typing-extensions = ">=4.10.0,<5.0.0" - -[[package]] -name = "tomli" -version = "2.0.1" -description = "A lil' TOML parser" -optional = false -python-versions = ">=3.7" -files = [ - {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, - {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, -] - -[[package]] -name = "tomlkit" -version = "0.12.4" -description = "Style preserving TOML library" -optional = false -python-versions = ">=3.7" -files = [ - {file = "tomlkit-0.12.4-py3-none-any.whl", hash = "sha256:5cd82d48a3dd89dee1f9d64420aa20ae65cfbd00668d6f094d7578a78efbb77b"}, - {file = "tomlkit-0.12.4.tar.gz", hash = "sha256:7ca1cfc12232806517a8515047ba66a19369e71edf2439d0f5824f91032b6cc3"}, -] - -[[package]] -name = "tqdm" -version = "4.66.2" -description = "Fast, Extensible Progress Meter" -optional = false -python-versions = ">=3.7" -files = [ - {file = "tqdm-4.66.2-py3-none-any.whl", hash = "sha256:1ee4f8a893eb9bef51c6e35730cebf234d5d0b6bd112b0271e10ed7c24a02bd9"}, - {file = "tqdm-4.66.2.tar.gz", hash = "sha256:6cd52cdf0fef0e0f543299cfc96fec90d7b8a7e88745f411ec33eb44d5ed3531"}, -] - -[package.dependencies] -colorama = {version = "*", markers = "platform_system == \"Windows\""} - -[package.extras] -dev = ["pytest (>=6)", "pytest-cov", "pytest-timeout", "pytest-xdist"] -notebook = ["ipywidgets (>=6)"] -slack = ["slack-sdk"] -telegram = ["requests"] - -[[package]] -name = "typing-extensions" -version = "4.11.0" -description = "Backported and Experimental Type Hints for Python 3.8+" -optional = false -python-versions = ">=3.8" -files = [ - {file = "typing_extensions-4.11.0-py3-none-any.whl", hash = "sha256:c1f94d72897edaf4ce775bb7558d5b79d8126906a14ea5ed1635921406c0387a"}, - {file = "typing_extensions-4.11.0.tar.gz", hash = "sha256:83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0"}, -] - -[[package]] -name = "uvicorn" -version = "0.29.0" -description = "The lightning-fast ASGI server." -optional = false -python-versions = ">=3.8" -files = [ - {file = "uvicorn-0.29.0-py3-none-any.whl", hash = "sha256:2c2aac7ff4f4365c206fd773a39bf4ebd1047c238f8b8268ad996829323473de"}, - {file = "uvicorn-0.29.0.tar.gz", hash = "sha256:6a69214c0b6a087462412670b3ef21224fa48cae0e452b5883e8e8bdfdd11dd0"}, -] - -[package.dependencies] -click = ">=7.0" -h11 = ">=0.8" -typing-extensions = {version = ">=4.0", markers = "python_version < \"3.11\""} - -[package.extras] -standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", "pyyaml (>=5.1)", "uvloop (>=0.14.0,!=0.15.0,!=0.15.1)", "watchfiles (>=0.13)", "websockets (>=10.4)"] - -[[package]] -name = "websockets" -version = "12.0" -description = "An implementation of the WebSocket Protocol (RFC 6455 & 7692)" -optional = false -python-versions = ">=3.8" -files = [ - {file = "websockets-12.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d554236b2a2006e0ce16315c16eaa0d628dab009c33b63ea03f41c6107958374"}, - {file = "websockets-12.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2d225bb6886591b1746b17c0573e29804619c8f755b5598d875bb4235ea639be"}, - {file = "websockets-12.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:eb809e816916a3b210bed3c82fb88eaf16e8afcf9c115ebb2bacede1797d2547"}, - {file = "websockets-12.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c588f6abc13f78a67044c6b1273a99e1cf31038ad51815b3b016ce699f0d75c2"}, - {file = "websockets-12.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5aa9348186d79a5f232115ed3fa9020eab66d6c3437d72f9d2c8ac0c6858c558"}, - {file = "websockets-12.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6350b14a40c95ddd53e775dbdbbbc59b124a5c8ecd6fbb09c2e52029f7a9f480"}, - {file = "websockets-12.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:70ec754cc2a769bcd218ed8d7209055667b30860ffecb8633a834dde27d6307c"}, - {file = "websockets-12.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6e96f5ed1b83a8ddb07909b45bd94833b0710f738115751cdaa9da1fb0cb66e8"}, - {file = "websockets-12.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:4d87be612cbef86f994178d5186add3d94e9f31cc3cb499a0482b866ec477603"}, - {file = "websockets-12.0-cp310-cp310-win32.whl", hash = "sha256:befe90632d66caaf72e8b2ed4d7f02b348913813c8b0a32fae1cc5fe3730902f"}, - {file = "websockets-12.0-cp310-cp310-win_amd64.whl", hash = "sha256:363f57ca8bc8576195d0540c648aa58ac18cf85b76ad5202b9f976918f4219cf"}, - {file = "websockets-12.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:5d873c7de42dea355d73f170be0f23788cf3fa9f7bed718fd2830eefedce01b4"}, - {file = "websockets-12.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3f61726cae9f65b872502ff3c1496abc93ffbe31b278455c418492016e2afc8f"}, - {file = "websockets-12.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ed2fcf7a07334c77fc8a230755c2209223a7cc44fc27597729b8ef5425aa61a3"}, - {file = "websockets-12.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e332c210b14b57904869ca9f9bf4ca32f5427a03eeb625da9b616c85a3a506c"}, - {file = "websockets-12.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5693ef74233122f8ebab026817b1b37fe25c411ecfca084b29bc7d6efc548f45"}, - {file = "websockets-12.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6e9e7db18b4539a29cc5ad8c8b252738a30e2b13f033c2d6e9d0549b45841c04"}, - {file = "websockets-12.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:6e2df67b8014767d0f785baa98393725739287684b9f8d8a1001eb2839031447"}, - {file = "websockets-12.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:bea88d71630c5900690fcb03161ab18f8f244805c59e2e0dc4ffadae0a7ee0ca"}, - {file = "websockets-12.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:dff6cdf35e31d1315790149fee351f9e52978130cef6c87c4b6c9b3baf78bc53"}, - {file = "websockets-12.0-cp311-cp311-win32.whl", hash = "sha256:3e3aa8c468af01d70332a382350ee95f6986db479ce7af14d5e81ec52aa2b402"}, - {file = "websockets-12.0-cp311-cp311-win_amd64.whl", hash = "sha256:25eb766c8ad27da0f79420b2af4b85d29914ba0edf69f547cc4f06ca6f1d403b"}, - {file = "websockets-12.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:0e6e2711d5a8e6e482cacb927a49a3d432345dfe7dea8ace7b5790df5932e4df"}, - {file = "websockets-12.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:dbcf72a37f0b3316e993e13ecf32f10c0e1259c28ffd0a85cee26e8549595fbc"}, - {file = "websockets-12.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:12743ab88ab2af1d17dd4acb4645677cb7063ef4db93abffbf164218a5d54c6b"}, - {file = "websockets-12.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7b645f491f3c48d3f8a00d1fce07445fab7347fec54a3e65f0725d730d5b99cb"}, - {file = "websockets-12.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9893d1aa45a7f8b3bc4510f6ccf8db8c3b62120917af15e3de247f0780294b92"}, - {file = "websockets-12.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1f38a7b376117ef7aff996e737583172bdf535932c9ca021746573bce40165ed"}, - {file = "websockets-12.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:f764ba54e33daf20e167915edc443b6f88956f37fb606449b4a5b10ba42235a5"}, - {file = "websockets-12.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:1e4b3f8ea6a9cfa8be8484c9221ec0257508e3a1ec43c36acdefb2a9c3b00aa2"}, - {file = "websockets-12.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:9fdf06fd06c32205a07e47328ab49c40fc1407cdec801d698a7c41167ea45113"}, - {file = "websockets-12.0-cp312-cp312-win32.whl", hash = "sha256:baa386875b70cbd81798fa9f71be689c1bf484f65fd6fb08d051a0ee4e79924d"}, - {file = "websockets-12.0-cp312-cp312-win_amd64.whl", hash = "sha256:ae0a5da8f35a5be197f328d4727dbcfafa53d1824fac3d96cdd3a642fe09394f"}, - {file = "websockets-12.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5f6ffe2c6598f7f7207eef9a1228b6f5c818f9f4d53ee920aacd35cec8110438"}, - {file = "websockets-12.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9edf3fc590cc2ec20dc9d7a45108b5bbaf21c0d89f9fd3fd1685e223771dc0b2"}, - {file = "websockets-12.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8572132c7be52632201a35f5e08348137f658e5ffd21f51f94572ca6c05ea81d"}, - {file = "websockets-12.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:604428d1b87edbf02b233e2c207d7d528460fa978f9e391bd8aaf9c8311de137"}, - {file = "websockets-12.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1a9d160fd080c6285e202327aba140fc9a0d910b09e423afff4ae5cbbf1c7205"}, - {file = "websockets-12.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:87b4aafed34653e465eb77b7c93ef058516cb5acf3eb21e42f33928616172def"}, - {file = "websockets-12.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:b2ee7288b85959797970114deae81ab41b731f19ebcd3bd499ae9ca0e3f1d2c8"}, - {file = "websockets-12.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:7fa3d25e81bfe6a89718e9791128398a50dec6d57faf23770787ff441d851967"}, - {file = "websockets-12.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:a571f035a47212288e3b3519944f6bf4ac7bc7553243e41eac50dd48552b6df7"}, - {file = "websockets-12.0-cp38-cp38-win32.whl", hash = "sha256:3c6cc1360c10c17463aadd29dd3af332d4a1adaa8796f6b0e9f9df1fdb0bad62"}, - {file = "websockets-12.0-cp38-cp38-win_amd64.whl", hash = "sha256:1bf386089178ea69d720f8db6199a0504a406209a0fc23e603b27b300fdd6892"}, - {file = "websockets-12.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:ab3d732ad50a4fbd04a4490ef08acd0517b6ae6b77eb967251f4c263011a990d"}, - {file = "websockets-12.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a1d9697f3337a89691e3bd8dc56dea45a6f6d975f92e7d5f773bc715c15dde28"}, - {file = "websockets-12.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:1df2fbd2c8a98d38a66f5238484405b8d1d16f929bb7a33ed73e4801222a6f53"}, - {file = "websockets-12.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:23509452b3bc38e3a057382c2e941d5ac2e01e251acce7adc74011d7d8de434c"}, - {file = "websockets-12.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2e5fc14ec6ea568200ea4ef46545073da81900a2b67b3e666f04adf53ad452ec"}, - {file = "websockets-12.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:46e71dbbd12850224243f5d2aeec90f0aaa0f2dde5aeeb8fc8df21e04d99eff9"}, - {file = "websockets-12.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:b81f90dcc6c85a9b7f29873beb56c94c85d6f0dac2ea8b60d995bd18bf3e2aae"}, - {file = "websockets-12.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:a02413bc474feda2849c59ed2dfb2cddb4cd3d2f03a2fedec51d6e959d9b608b"}, - {file = "websockets-12.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:bbe6013f9f791944ed31ca08b077e26249309639313fff132bfbf3ba105673b9"}, - {file = "websockets-12.0-cp39-cp39-win32.whl", hash = "sha256:cbe83a6bbdf207ff0541de01e11904827540aa069293696dd528a6640bd6a5f6"}, - {file = "websockets-12.0-cp39-cp39-win_amd64.whl", hash = "sha256:fc4e7fa5414512b481a2483775a8e8be7803a35b30ca805afa4998a84f9fd9e8"}, - {file = "websockets-12.0-pp310-pypy310_pp73-macosx_10_9_x86_64.whl", hash = "sha256:248d8e2446e13c1d4326e0a6a4e9629cb13a11195051a73acf414812700badbd"}, - {file = "websockets-12.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f44069528d45a933997a6fef143030d8ca8042f0dfaad753e2906398290e2870"}, - {file = "websockets-12.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c4e37d36f0d19f0a4413d3e18c0d03d0c268ada2061868c1e6f5ab1a6d575077"}, - {file = "websockets-12.0-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d829f975fc2e527a3ef2f9c8f25e553eb7bc779c6665e8e1d52aa22800bb38b"}, - {file = "websockets-12.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:2c71bd45a777433dd9113847af751aae36e448bc6b8c361a566cb043eda6ec30"}, - {file = "websockets-12.0-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:0bee75f400895aef54157b36ed6d3b308fcab62e5260703add87f44cee9c82a6"}, - {file = "websockets-12.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:423fc1ed29f7512fceb727e2d2aecb952c46aa34895e9ed96071821309951123"}, - {file = "websockets-12.0-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:27a5e9964ef509016759f2ef3f2c1e13f403725a5e6a1775555994966a66e931"}, - {file = "websockets-12.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c3181df4583c4d3994d31fb235dc681d2aaad744fbdbf94c4802485ececdecf2"}, - {file = "websockets-12.0-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:b067cb952ce8bf40115f6c19f478dc71c5e719b7fbaa511359795dfd9d1a6468"}, - {file = "websockets-12.0-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:00700340c6c7ab788f176d118775202aadea7602c5cc6be6ae127761c16d6b0b"}, - {file = "websockets-12.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e469d01137942849cff40517c97a30a93ae79917752b34029f0ec72df6b46399"}, - {file = "websockets-12.0-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ffefa1374cd508d633646d51a8e9277763a9b78ae71324183693959cf94635a7"}, - {file = "websockets-12.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba0cab91b3956dfa9f512147860783a1829a8d905ee218a9837c18f683239611"}, - {file = "websockets-12.0-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2cb388a5bfb56df4d9a406783b7f9dbefb888c09b71629351cc6b036e9259370"}, - {file = "websockets-12.0-py3-none-any.whl", hash = "sha256:dc284bbc8d7c78a6c69e0c7325ab46ee5e40bb4d50e494d8131a07ef47500e9e"}, - {file = "websockets-12.0.tar.gz", hash = "sha256:81df9cbcbb6c260de1e007e58c011bfebe2dafc8435107b0537f393dd38c8b1b"}, -] - -[metadata] -lock-version = "2.0" -python-versions = "^3.10" -content-hash = "c4b3891e09fa5019b1ec31afb6871810361acf155f60a5ca604ac389963fbaa7" diff --git a/examples/notebooks/prompt-enhance.py b/examples/notebooks/prompt-enhance.py deleted file mode 100644 index b5571ac..0000000 --- a/examples/notebooks/prompt-enhance.py +++ /dev/null @@ -1,147 +0,0 @@ -import marimo - -__generated_with = "0.3.12" -app = marimo.App(width="medium") - - -@app.cell -def __(): - import time - - print(f"time {int(time.time())}") - return (time,) - - -@app.cell -def __(__file__): - import os - import sys - import typing_extensions - from pathlib import Path - import marimo as mo - import substrate as ss - - # add parent dir to sys.path to make 'substrate' importable - parent_dir = Path(__file__).resolve().parent.parent - sys.path.insert(0, str(parent_dir)) - - api_key = os.environ.get("SUBSTRATE_API_KEY") - if api_key is None: - raise EnvironmentError("No SUBSTRATE_API_KEY set") - - substrate = ss.Substrate(api_key=api_key) - return ( - Path, - api_key, - mo, - os, - parent_dir, - ss, - substrate, - sys, - typing_extensions, - ) - - -@app.cell -def __(): - # create = ss.CreateVectorStore( - # collection_name="image_prompt_enhancements", - # model="jina-v2", - # ); - # create_res = substrate.run(create) - - # mo.tree(create_res.json) - return - - -@app.cell -def __(ss): - enhancements = [ - "highly detailed", - "digital painting", - "ultrafine detailed painting", - "cell shaded cartoon", - "concept art", - "matte", - "octane render", - "volumetric lighting", - "exquisite detail", - "8k postprocessing", - "cinematic", - "sharp focus", - "wide shot", - "wide angle", - ] - nodes = [] - for e in enhancements: - embed = ss.EmbedText( - text=e, - collection_name="image_prompt_enhancements", - model="jina-v2", - ) - nodes.append(embed) - # embed_res = substrate.run(*nodes) - # mo.tree(embed_res.json) - return e, embed, enhancements, nodes - - -@app.cell -def __(mo, ss, substrate): - prompt = "a towering spiral seashell in a city the size of a city skyscraper" - query = ss.QueryVectorStore( - query_strings=[prompt], - collection_name="image_prompt_enhancements", - model="jina-v2", - include_metadata=True, - top_k=3, - ) - image1 = ss.GenerateImage( - prompt=ss.sb.concat( - prompt, - "octane render, volumetric lighting, cinematic, highly detailed, ", - query.future.results[0][0].metadata["doc"], - ) - ) - image2 = ss.GenerateImage( - prompt=ss.sb.concat( - prompt, - "cell shaded cartoon, volumetric lighting, cinematic, highly detailed, ", - query.future.results[0][1].metadata["doc"], - ) - ) - query_res = substrate.run(query, image1, image2) - # query_out = query_res.get(query); - mo.tree(query_res.json) - return image1, image2, prompt, query, query_res - - -@app.cell -def __(image1, image2, mo, query_res): - mo.hstack( - [ - mo.vstack( - [ - mo.image(query_res.get(image1).image_uri), - mo.download(query_res.get(image1).image_uri), - ] - ), - mo.vstack( - [ - mo.image(query_res.get(image2).image_uri), - mo.download(query_res.get(image2).image_uri), - ] - ), - ] - ) - return - - -@app.cell -def __(): - # mo.tree(response.json) - return - - -if __name__ == "__main__": - app.run() diff --git a/examples/notebooks/pyproject.toml b/examples/notebooks/pyproject.toml deleted file mode 100644 index 821003b..0000000 --- a/examples/notebooks/pyproject.toml +++ /dev/null @@ -1,18 +0,0 @@ -[tool.poetry] -name = "substrate-notebooks" -version = "0.0.0" -description = "" -authors = ["substrate "] -readme = "README.md" - -[tool.poetry.dependencies] -python = "^3.10" -marimo = "^0.3.4" -substrate = "*" -openai = "^1.25.0" -pillow = "^10.3.0" -beautifulsoup4 = "^4.12.3" - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/examples/notebooks/svd.py b/examples/notebooks/svd.py deleted file mode 100644 index c214644..0000000 --- a/examples/notebooks/svd.py +++ /dev/null @@ -1,74 +0,0 @@ -import marimo - -__generated_with = "0.6.23" -app = marimo.App() - - -@app.cell -def __(): - import os - import json - - import marimo as mo - - api_key = os.environ.get("SUBSTRATE_API_KEY") - api_key = api_key or "YOUR_API_KEY" - print(api_key) - return api_key, json, mo, os - - -@app.cell -def __(api_key): - from substrate import Substrate - - substrate = Substrate(api_key=api_key, base_url="https://api.substrate.run") - return Substrate, substrate - - -@app.cell -def __(substrate): - from substrate import GenerateImage, UpscaleImage, StableVideoDiffusion - - prompt = "aerial shot of desert at sunset under clouds" - image_node = GenerateImage( - prompt=prompt, - seed=888, - ) - video_node = StableVideoDiffusion( - image_uri=image_node.future.image_uri, store="hosted", motion_bucket_id=20, fps=10 - ) - - res = substrate.run(video_node) - return ( - GenerateImage, - StableVideoDiffusion, - UpscaleImage, - image_node, - prompt, - res, - video_node, - ) - - -@app.cell -def __(res): - print(res.request_id) - print(res) - return - - -@app.cell -def __(res, video_node): - video = res.get(video_node).video_uri - print(video) - return video, - - -@app.cell -def __(mo, video): - mo.image(video) - return - - -if __name__ == "__main__": - app.run() diff --git a/examples/remove_bg_objects.py b/examples/remove_bg_objects.py deleted file mode 100755 index 91911b9..0000000 --- a/examples/remove_bg_objects.py +++ /dev/null @@ -1,46 +0,0 @@ -import os -import json - -api_key = os.environ.get("SUBSTRATE_API_KEY") -if api_key is None: - raise EnvironmentError("No SUBSTRATE_API_KEY set") - -from substrate import ( - Box, - Substrate, - EraseImage, - ComputeText, - InpaintImage, - GenerateImage, - RemoveBackground, - sb, -) - -substrate = Substrate(api_key=api_key, timeout=60 * 5) -num_images = 2 -object_name = "a red leather wing chair" -artists = [ - ComputeText( - prompt="respond with just the name of a 20th century painter (moma, whitney): ", max_tokens=10, temperature=1 - ) - for _ in range(num_images) -] -prompt_for = lambda x: sb.concat("by ", x, object_name, " in an open room, pillars, amazing painting composition") -bg_prompt_for = lambda x: sb.concat("by ", x, "an empty room with pillars, amazing painting composition") -images = [GenerateImage(prompt=prompt_for(artist.future.text), _cache_age=1000) for artist in artists] -removals = [RemoveBackground(image_uri=image.future.image_uri) for image in images] -masks = [RemoveBackground(image_uri=image.future.image_uri, return_mask=True) for image in images] -bg_images = [ - EraseImage(image_uri=image.future.image_uri, mask_image_uri=mask.future.image_uri) - for image, mask in zip(images, masks, strict=False) -] -inpainted_images = [ - InpaintImage(image_uri=bg_image.future.image_uri, prompt=bg_prompt_for(artist.future.text), store="hosted") - for bg_image, artist in zip(bg_images, artists, strict=False) -] -final = Box(value=[inpainted_image.future.image_uri for inpainted_image in inpainted_images]) -result = substrate.run(final) -viz = Substrate.visualize(final) -os.system(f"open {viz}") - -print(json.dumps(result.json, indent=2)) diff --git a/examples/streaming.py b/examples/streaming.py deleted file mode 100755 index 3b45ada..0000000 --- a/examples/streaming.py +++ /dev/null @@ -1,38 +0,0 @@ -import os -import sys -import asyncio -from pathlib import Path - -# add parent dir to sys.path to make 'substrate' importable -parent_dir = Path(__file__).resolve().parent.parent -sys.path.insert(0, str(parent_dir)) - -api_key = os.environ.get("SUBSTRATE_API_KEY") -if api_key is None: - raise EnvironmentError("No SUBSTRATE_API_KEY set") - -from substrate import Substrate, ComputeText, sb - -substrate = Substrate(api_key=api_key, timeout=60 * 5) - - -a = ComputeText(prompt="tell me about windmills", max_tokens=10) -b = ComputeText(prompt=sb.concat("is this true? ", a.future.text), max_tokens=10) - - -async def amain(): - response = await substrate.async_stream(a, b) - async for event in response.async_iter(): - print(event) - - -asyncio.run(amain()) - - -def main(): - response = substrate.stream(a, b) - for message in response.iter(): - print(message) - - -main() diff --git a/examples/streaming/fastapi-example/main.py b/examples/streaming/fastapi-example/main.py deleted file mode 100644 index 1cb519b..0000000 --- a/examples/streaming/fastapi-example/main.py +++ /dev/null @@ -1,30 +0,0 @@ -import os -import sys -from pathlib import Path - -from substrate.nodes import Llama3Instruct8B - -# add parent dir to sys.path to make 'substrate' importable -parent_dir = Path(__file__).resolve().parent.parent.parent.parent -sys.path.insert(0, str(parent_dir)) - -api_key = os.environ.get("SUBSTRATE_API_KEY") -if api_key is None: - raise EnvironmentError("No SUBSTRATE_API_KEY set") - -from fastapi import FastAPI -from fastapi.responses import StreamingResponse - -from substrate import Substrate, Llama3Instruct8B - -app = FastAPI() -substrate = Substrate(api_key=api_key, timeout=60 * 5) - - -@app.get("/qotd") -def quote_of_the_day(): - quote = Llama3Instruct8B(prompt="What's an inspirational quote of the day?") - - response = substrate.stream(quote) - - return StreamingResponse(response.iter_events(), media_type="text/event-stream") diff --git a/examples/techniques/README.md b/examples/techniques/README.md new file mode 100644 index 0000000..fbbcf9e --- /dev/null +++ b/examples/techniques/README.md @@ -0,0 +1 @@ +# Technique examples diff --git a/examples/workshop/README.md b/examples/workshop/README.md new file mode 100644 index 0000000..607e84c --- /dev/null +++ b/examples/workshop/README.md @@ -0,0 +1 @@ +# Workshop examples diff --git a/examples/descript/__init__.py b/examples/workshop/descript/__init__.py similarity index 100% rename from examples/descript/__init__.py rename to examples/workshop/descript/__init__.py diff --git a/examples/descript/generate.py b/examples/workshop/descript/generate.py similarity index 100% rename from examples/descript/generate.py rename to examples/workshop/descript/generate.py diff --git a/examples/descript/generate_chapters.py b/examples/workshop/descript/generate_chapters.py similarity index 100% rename from examples/descript/generate_chapters.py rename to examples/workshop/descript/generate_chapters.py diff --git a/examples/descript/index.html b/examples/workshop/descript/index.html similarity index 100% rename from examples/descript/index.html rename to examples/workshop/descript/index.html diff --git a/examples/descript/util.py b/examples/workshop/descript/util.py similarity index 100% rename from examples/descript/util.py rename to examples/workshop/descript/util.py diff --git a/examples/mixture-of-agents/ask.py b/examples/workshop/mixture-of-agents/ask.py similarity index 100% rename from examples/mixture-of-agents/ask.py rename to examples/workshop/mixture-of-agents/ask.py diff --git a/examples/mixture-of-agents/index.html b/examples/workshop/mixture-of-agents/index.html similarity index 100% rename from examples/mixture-of-agents/index.html rename to examples/workshop/mixture-of-agents/index.html diff --git a/examples/mixture-of-agents/util.py b/examples/workshop/mixture-of-agents/util.py similarity index 100% rename from examples/mixture-of-agents/util.py rename to examples/workshop/mixture-of-agents/util.py