Skip to content

Commit 49b5901

Browse files
committed
slight update
1 parent 91d89cf commit 49b5901

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/components/models/code/AutomaticSpeechRecognitionCode.astro

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ export default {
3636
},
3737
} satisfies ExportedHandler<Env>;
3838
`;
39+
40+
const curl = `
41+
curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run/${name} \\
42+
-X POST \\
43+
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \\
44+
--data-binary "@talking-llama.mp3"
45+
`;
3946
---
4047

4148
<Details header="Workers - TypeScript">

src/components/models/code/WhisperBase64Code.astro

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,3 @@ export default {
4848
<Details header="Workers - TypeScript">
4949
<Code code={worker} lang="ts" />
5050
</Details>
51-
52-
<Details header="curl">
53-
<Code code={curl} lang="sh" />
54-
</Details>

src/pages/workers-ai/models/[name].astro

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import TranslationCode from "~/components/models/code/TranslationCode.astro";
2222
import StableDiffusionV15Img2ImgCode from "~/components/models/code/StableDiffusion-v1-5-img2imgCode.astro";
2323
import StableDiffusionV15InpaintingCode from "~/components/models/code/StableDiffusion-v1-5-inpaintingCode.astro";
2424
import Flux1Schnell from "~/components/models/code/Flux-1-Schnell.astro";
25+
import WhisperBase64Code from "~/components/models/code/WhisperBase64Code.astro";
2526
2627
import { authorData } from "~/components/models/data";
2728
@@ -88,6 +89,10 @@ if (model.name === "@cf/black-forest-labs/flux-1-schnell") {
8889
CodeExamples = Flux1Schnell;
8990
}
9091
92+
if (model.name === "@cf/black-forest-labs/flux-1-schnell") {
93+
CodeExamples = Flux1Schnell;
94+
}
95+
9196
const description = model.description;
9297
const terms = model.properties.find((x) => x.property_id === "terms");
9398

0 commit comments

Comments
 (0)