Search

Results include substring matches and semantically similar vals. Learn more
kortina avatar
subaudio
@kortina
sub.audio – generate subtitles and chapters for any audio URL. Speech-to-text and chapter summaries powered by Substrate 🪩 To fork, sign up for Substrate to get your own API key and $50 free credits
HTTP (deprecated)
[sub.audio](https://sub.audio) – generate subtitles and chapters for any audio URL.
Speech-to-text and chapter summaries powered by [Substrate](https://substrate.run)
🪩 To fork, [sign up for Substrate](https://substrate.run/signin) to get your own API key and $50 free credits
import { ComputeJSON, sb, Substrate, TranscribeSpeech } from "npm:substrate";
import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo?v=29";
async function processAudio(audio_uri) {
const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });
const opts = { cache_age: 60 * 60 * 24 * 7 };
opts,
const res = await substrate.run(transcribe, chapters, timestamps);
return {
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="https://www.substrate.run/favicon.ico" type="image/x-icon">
<link
!audio_uri
? `<a id="federer-link" href="?url=https://media.substrate.run/federer-dartmouth.m4a">Or try an example: federer-dartmo
<div id="loading">Running...</div>
</div>
<a id="made-with" href="https://substrate.run" target="_blank"
>made with <b>substrate</b></a
<a id="view-source" href="${extractValInfo(import.meta.url).htmlUrl}" target="_blank"
kora avatar
subaudio
@kora
sub.audio – generate subtitles and chapters for any audio URL. Speech-to-text and chapter summaries powered by Substrate 🪩 To fork, sign up for Substrate to get your own API key and $50 free credits
HTTP (deprecated)
[sub.audio](https://sub.audio) – generate subtitles and chapters for any audio URL.
Speech-to-text and chapter summaries powered by [Substrate](https://substrate.run)
🪩 To fork, [sign up for Substrate](https://substrate.run/signin) to get your own API key and $50 free credits
import { ComputeJSON, sb, Substrate, TranscribeSpeech } from "npm:substrate";
import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo?v=29";
async function processAudio(audio_uri) {
const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });
const opts = { cache_age: 60 * 60 * 24 * 7 };
opts,
const res = await substrate.run(transcribe, chapters, timestamps);
return {
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="https://www.substrate.run/favicon.ico" type="image/x-icon">
<link
!audio_uri
? `<a id="federer-link" href="?url=https://media.substrate.run/federer-dartmouth.m4a">Or try an example: federer-dartmo
<div id="loading">Running...</div>
</div>
<a id="made-with" href="https://substrate.run" target="_blank"
>made with <b>substrate</b></a
<a id="view-source" href="${extractValInfo(import.meta.url).htmlUrl}" target="_blank"
nknj avatar
hackerNewsRAG
@nknj
Find comments on HN (powered by Algolia ), extract content and return a streaming markdown summary (powered by Substrate ). The RAG portion of this is 34 lines of Substrate code. Read the walkthrough: https://x.com/vprtwn/status/1812844236401762513 🪩 To fork, sign up for Substrate to get your own API key and $50 free credits. See also: https://www.val.town/v/substrate/twitterRAG
HTTP (deprecated)
pi)), extract content and return a streaming markdown summary (powered by [Substrate](https://substrate.run)).
The RAG portion of this is 34 lines of Substrate code. Read the walkthrough: https://x.com/vprtwn/status/1812844236401762513
🪩 To fork, [sign up for Substrate](https://substrate.run/signin) to get your own API key and $50 free credits.
See also:
- https://www.val.town/v/substrate/twitterRAG
import { hnSearch } from "https://esm.town/v/stevekrouse/hnSearch";
import { ComputeJSON, ComputeText, sb, Substrate } from "npm:substrate";
import { z } from "npm:zod";
import { zodToJsonSchema } from "npm:zod-to-json-schema";
const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });
// search for HN comments using https://hn.algolia.com/api
}); markdown.id = "markdown"
const stream = await substrate.stream(markdown);
// Render streaming markdown
export default async function handler(req: Request): Promise<Response> {
const renderMarkdown = (await import("https://esm.town/v/substrate/renderMarkdown")).default;
return renderMarkdown(stream);
substrate avatar
substrateBadgeMiddleware
@substrate
How to use: import wrapper from "https://esm.town/v/substrate/substrateBadgeMiddleware"; async function handler(req: Request): Promise<Response> { const html = ` <h1>Hello, world</h1> `; return new Response(html, { headers: { "Content-Type": "text/html; charset=utf-8", }, }); } export default wrapper(handler, import.meta.url); reference: https://www.val.town/v/jxnblk/valTownBadge
Script
```tsx
import wrapper from "https://esm.town/v/substrate/substrateBadgeMiddleware";
async function handler(req: Request): Promise<Response> {
import valTownBadge from "https://esm.town/v/substrate/substrateBadge";
export default function badgeMiddleware(handler, url: string) {
return async function(req: Request): Promise<Response> {
pa avatar
gifStory
@pa
Generates a story and then a storyboard with 5 animated frames. Note : You'll need to fork this example (and un-comment some code) to run it with new input. Currently it renders cached output, for demo purposes (running takes 30-60s). 🪩 To fork, sign up for Substrate to get your own API key and $50 free credits
HTTP (deprecated)
🪩 To fork, [sign up for Substrate](https://substrate.run/signin) to get your own API key and $50 free credits
import { ComputeJSON, ComputeText, GenerateImage, sb, StableVideoDiffusion, Substrate } from "npm:substrate";
const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });
// const res = await substrate.run(...videoNodes);
"https://cdn.substrate.run/u/TdI00FeAB8nzr0Su/d73078011783f5ac37980e47df9d0ee7985fd2d476eed501_1722427247.gif",
"https://cdn.substrate.run/u/TdI00FeAB8nzr0Su/69c79387d16391d3f8c246ccbd694bed55f39d3a60a66fde_1722427247.gif",
"https://cdn.substrate.run/u/TdI00FeAB8nzr0Su/75db479fdc66d185edbf24f7b037257adb98ec7bfe7b10db_1722427248.gif",
"https://cdn.substrate.run/u/TdI00FeAB8nzr0Su/bd26d54a083b540210ac23bc9fd296fc13db9a9edff6718b_1722427271.gif",
"https://cdn.substrate.run/u/TdI00FeAB8nzr0Su/b14849ad8bb9af9c60567d85d37de79c1d634748ed6ad9d4_1722427265.gif",
<title>GIF Story | Substrate</title>
<a href="https://www.substrate.run" target="_blank" style="font-size:0.8rem;color:#000;text-decoration:none;display:blo
cenktekin avatar
hackerNewsRAG
@cenktekin
Find comments on HN (powered by Algolia ), extract content and return a streaming markdown summary (powered by Substrate ). The RAG portion of this is 34 lines of Substrate code. Twitter thread walkthrough: https://x.com/vprtwn/status/1812844236401762513 🪩 To fork, sign up for Substrate to get your own API key and $50 free credits.
HTTP (deprecated)
pi)), extract content and return a streaming markdown summary (powered by [Substrate](https://substrate.run)).
The RAG portion of this is 34 lines of Substrate code. Twitter thread walkthrough: https://x.com/vprtwn/status/18128442364017
🪩 To fork, [sign up for Substrate](https://substrate.run/signin) to get your own API key and $50 free credits.
import { hnSearch } from "https://esm.town/v/stevekrouse/hnSearch";
import inputHeader from "https://esm.town/v/substrate/inputHeader";
import { ComputeJSON, ComputeText, sb, Substrate } from "npm:substrate";
import { z } from "npm:zod";
import { zodToJsonSchema } from "npm:zod-to-json-schema";
const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });
// search for HN comments using https://hn.algolia.com/api
model: "Llama3Instruct70B",
const stream = await substrate.stream(markdown);
// Render streaming markdown
nknj avatar
salmonMole
@nknj
Find comments on HN (powered by Algolia ), extract content and return a streaming markdown summary (powered by Substrate ). The RAG portion of this is 34 lines of Substrate code. Read the walkthrough: https://x.com/vprtwn/status/1812844236401762513 🪩 To fork, sign up for Substrate to get your own API key and $50 free credits. See also: https://www.val.town/v/substrate/twitterRAG
HTTP (deprecated)
pi)), extract content and return a streaming markdown summary (powered by [Substrate](https://substrate.run)).
The RAG portion of this is 34 lines of Substrate code. Read the walkthrough: https://x.com/vprtwn/status/1812844236401762513
🪩 To fork, [sign up for Substrate](https://substrate.run/signin) to get your own API key and $50 free credits.
See also:
- https://www.val.town/v/substrate/twitterRAG
import { hnSearch } from "https://esm.town/v/stevekrouse/hnSearch";
import { ComputeJSON, ComputeText, sb, Substrate } from "npm:substrate";
import { z } from "npm:zod";
import { zodToJsonSchema } from "npm:zod-to-json-schema";
const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });
// search for HN comments using https://hn.algolia.com/api
markdown.id = "markdown";
const stream = await substrate.stream(markdown);
// Render streaming markdown
export default async function handler(req: Request): Promise<Response> {
const renderMarkdown = (await import("https://esm.town/v/substrate/renderMarkdown")).default;
return renderMarkdown(stream);
stevekrouse avatar
imageGeneration
@stevekrouse
Generate a description for an image, generate the image, and upscale it. 🪩 To fork, sign up for Substrate to get your own API key and $50 free credits
HTTP (deprecated)
Generate a description for an image, generate the image, and upscale it.
🪩 To fork, [sign up for Substrate](https://substrate.run/signin) to get your own API key and $50 free credits
import { ComputeText, GenerateImage, Substrate, UpscaleImage } from "npm:substrate";
const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });
const prompt = "futuristic city of atlants";
const upscale = new UpscaleImage({ prompt: description.future.text, image_uri: image.future.image_uri, output_resolution: 204
const stream = substrate.stream(upscale);
export default async function render(req: Request): Promise<Response> {
const renderNodeResults = (await import("https://esm.town/v/substrate/renderNodeResults")).default;
return renderNodeResults(stream);
paulhoule avatar
hackerNewsRAG
@paulhoule
Find comments on HN (powered by Algolia ), extract content and return a streaming markdown summary (powered by Substrate ). The RAG portion of this is 34 lines of Substrate code. Twitter thread walkthrough: https://x.com/vprtwn/status/1812844236401762513 🪩 To fork, sign up for Substrate to get your own API key and $50 free credits.
HTTP (deprecated)
pi)), extract content and return a streaming markdown summary (powered by [Substrate](https://substrate.run)).
The RAG portion of this is 34 lines of Substrate code. Twitter thread walkthrough: https://x.com/vprtwn/status/18128442364017
🪩 To fork, [sign up for Substrate](https://substrate.run/signin) to get your own API key and $50 free credits.
import { hnSearch } from "https://esm.town/v/stevekrouse/hnSearch";
import inputHeader from "https://esm.town/v/substrate/inputHeader";
import { ComputeJSON, ComputeText, sb, Substrate } from "npm:substrate";
import { z } from "npm:zod";
import { zodToJsonSchema } from "npm:zod-to-json-schema";
const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });
// search for HN comments using https://hn.algolia.com/api
model: "Llama3Instruct70B",
const stream = await substrate.stream(markdown);
// Render streaming markdown
substrate avatar
renderHTML
@substrate
Render streaming html
HTTP (deprecated)
Render streaming html
export default function renderHTML(stream: any) {
let { readable, writable } = new TransformStream();
let writer = writable.getWriter();
const textEncoder = new TextEncoder();
let htmlStarted = false;
let logLines = [];
new Promise(async () => {
for await (const event of stream) {
if (event.object === "node.result") {
substrate avatar
substrateBadge
@substrate
Render this badge: Use the middleware: https://www.val.town/v/substrate/substrateBadgeMiddleware Or: import substrateBadge from "https://esm.town/v/substrate/substrateBadge"; export default async function(req: Request): Promise<Response> { const badge = substrateBadge(import.meta.url); const html = ` <h1>Hello, world</h1> ${badge} `; return new Response(html, { headers: { "Content-Type": "text/html; charset=utf-8", }, }); }
HTTP (deprecated)
Render this badge:
![Substrate demo on Val Town](https://substrate-substratebadge.web.val.run/)
Use the middleware: https://www.val.town/v/substrate/substrateBadgeMiddleware
Or:
```tsx
import substrateBadge from "https://esm.town/v/substrate/substrateBadge";
export default async function(req: Request): Promise<Response> {
const badge = substrateBadge(import.meta.url);
const html = `
// substrate + valtown badge
const left = 80;
<rect width="${width}" height="${height}" fill="#111" rx="${radius}" ry="${radius}" />
<a href="https://substrate.run">
<text x="8" y="17" textAnchor="start" fill="#fff" style="font-family:system-ui,sans-serif;font-size:12px;font-weight:500;
Substrate
</text>
qiangua avatar
similarSites
@qiangua
Find similar pages on HN and return a streaming markdown summary. Powered by Exa and Substrate . 🪩 To fork, sign up for Substrate to get your own API key and $50 free credits.
HTTP (deprecated)
Find similar pages on HN and return a streaming markdown summary.
Powered by [Exa](https://exa.ai/) and [Substrate](https://substrate.run).
🪩 To fork, [sign up for Substrate](https://substrate.run/signin) to get your own API key and $50 free credits.
import urlHeader from "https://esm.town/v/substrate/urlHeader";
import Exa from "npm:exa-js";
import { ComputeText, GenerateImage, sb, Substrate } from "npm:substrate";
const exa = new Exa(Deno.env.get("EXA_API_KEY"));
const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });
export default async function handler(req: Request): Promise<Response> {
model: "Llama3Instruct70B",
const stream = await substrate.stream(summary);
let { readable, writable } = new TransformStream();
levi avatar
twitterRAG
@levi
NOTE: We've disabled the Exa API key in this demo due to high volume – you'll need to fork and provide your own to use it. Search on Twitter (powered by Exa ) and return a streaming markdown summary (powered by Substrate ). To fork, sign up for Substrate to get your own API key and $51 free credits. You'll also need Exa, which comes with generous free credits and can be a much cheaper alternative to the Twitter API.
HTTP (deprecated)
NOTE: We've disabled the Exa API key in this demo due to high volume – you'll need to fork and provide your own to use it.
Exa](https://exa.ai)) and return a streaming markdown summary (powered by [Substrate](https://substrate.run)).
To fork, [sign up for Substrate](https://substrate.run/) to get your own API key and $51 free credits.
You'll also need Exa, which comes with generous free credits and can be a much cheaper alternative to the Twitter API.
import Exa from "npm:exa-js";
import { ComputeJSON, ComputeText, sb, Substrate } from "npm:substrate";
import { z } from "npm:zod";
const exa = new Exa(Deno.env.get("EXA_API_KEY"));
const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });
const query = `"exa.ai" OR "@ExaAILabs"`;
markdown.id = "markdown";
const stream = await substrate.stream(markdown);
// Render streaming markdown
export default async function handler(req: Request): Promise<Response> {
const renderMarkdown = (await import("https://esm.town/v/substrate/renderMarkdown")).default;
return renderMarkdown(stream);
3
Next