codex-lv2-may-2025

Lesson: Exploring and Using Hugging Face Models (with Fireworks)

In this lesson, you will learn how to explore Hugging Face models, test them in the playground, and then generate code to call a model from your own webpage using the Fireworks inference provider.

See the google doc version of this guide here.


Step 1: Create Your Hugging Face Account

TODO:

Challenge:


Step 2: Explore Models

TODO:

Filters Panel with Text Generation and Fireworks Selected

Challenge:


Step 3: Read Model Cards

TODO:

Accept Terms Dialog

Challenge:


Step 4: Try Models on the Card Page

TODO:

Try it out Box with Generated Response

Challenge:


Step 5: Explore More Models

TODO:

Challenge:


Step 6: Set Up Your Project

TODO:

Challenge:


Step 7: Get Your API Token

TODO:

Access Tokens Page

Challenge:


Step 8: Configure .gitignore

TODO:

Why this matters:

General Secrets Info
Think of your API token like the password to your house. You wouldn’t leave your house key taped to the front door, right? Similarly, you don’t want to leave your token sitting in plain sight where anyone can grab it. Tokens give access to powerful tools, and if someone else gets yours, they can run up costs or break rules under your name.

What is a .gitignore?
A .gitignore file is like a “do not pack” list when you’re moving. It tells Git which files to leave behind when you upload your project to GitHub. By putting secret-variables.js in .gitignore, you’re telling Git: “Never put this secret key in the moving truck.” That way your private stuff stays safe at home.

Deep Dive
When you commit files to Git without a .gitignore, everything—including secrets—goes into the repository history forever. Even if you delete it later, the secret can still be recovered from old versions. Hackers actually scan GitHub looking for exposed API tokens. Using .gitignore ensures your tokens never enter the history in the first place, which is the strongest protection.

Challenge:


Step 9: Generate Code

TODO:

Use this model Code JavaScript Section

Challenge:


Step 10: Add Your Token

TODO:

Challenge:


Step 11: Run and Inspect

TODO:

📸 Screenshot Placeholder – Show the browser DevTools console and the JSON response.

Challenge:


Step 12: Change Prompts

TODO:

Challenge:


Step 13: Console Log the Response Content

TODO:

Challenge:


✅ Learning Objectives