Skip to content

Commit

Permalink
add headings to some ml examples
Browse files Browse the repository at this point in the history
  • Loading branch information
kning committed Sep 20, 2024
1 parent 88080e6 commit f1988b4
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 2 deletions.
4 changes: 4 additions & 0 deletions 06_gpu_and_ml/embeddings/instructor.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# # Instructor Embedding
#
# This example runs the [Instructor](https://github.com/xlang-ai/instructor-embedding) embedding model and runs a simple sentence similarity computation.

import modal

MODEL_DIR = "/model"
Expand Down
4 changes: 4 additions & 0 deletions 06_gpu_and_ml/embeddings/text_embeddings_inference.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# ---
# cmd: ["modal", "run", "06_gpu_and_ml/embeddings/text_embeddings_inference.py::embed_dataset"]
# ---
# # Text Embeddings Inference
#
# This example runs the [Text Embedding Inference (TEI)](https://github.com/huggingface/text-embeddings-inference) toolkit on the Hacker News BigQuery public dataset.

import json
import os
import socket
Expand Down
6 changes: 5 additions & 1 deletion 06_gpu_and_ml/stable_diffusion/flux.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# ---
# output-directory: "/tmp/flux"
# ---
# example originally contributed by [@Arro](https://github.com/Arro)
# # Flux.1 (Schnell)
#
# This example runs the popular [Flux.1-schnell](https://www.google.com/search?client=firefox-b-1-d&q=flux+schnell+) text-to-image model on Modal.
#
# Thanks to [@Arro](https://github.com/Arro) for the original contribution.
from io import BytesIO
from pathlib import Path

Expand Down
5 changes: 4 additions & 1 deletion 06_gpu_and_ml/stable_diffusion/playground.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
# output-directory: "/tmp/playground-2-5"
# args: ["--prompt", "A cinematic shot of a baby raccoon wearing an intricate Italian priest robe."]
# ---

# # Playground v2.5
#
# This example runs the popular [Playground v2.5](https://huggingface.co/playgroundai/playground-v2.5-1024px-aesthetic) text-to-image on Modal.
#
from pathlib import Path

import fastapi.staticfiles
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# ---
# output-directory: "/tmp/stable-diffusion-xl-lightning"
# ---
# # SDXL Lightning
#
# This example runs [SDXL-Lightning](https://huggingface.co/ByteDance/SDXL-Lightning) by ByteDance, a fast text-to-image model that generates high quality images in just a few steps.
#

from pathlib import Path

import modal
Expand Down
4 changes: 4 additions & 0 deletions 06_gpu_and_ml/stable_diffusion/stable_video_diffusion.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# ---
# cmd: ["modal", "serve", "06_gpu_and_ml/stable_diffusion/stable_video_diffusion.py"]
# ---
# # Stable Video Diffusion
#
# This example runs the [Stable Video Diffusion](https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt) image-to-video model.

import os
import sys

Expand Down

0 comments on commit f1988b4

Please sign in to comment.