You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
🧩 Step 1: Tell PowerShell it's okay to run scripts
🗣️ “Hey PowerShell, please allow me to run my own scripts safely.”
This unlocks the ability to activate environments and run Python code.
🧩 Step 2: Go to the folder where my project lives
cd "C:\-----\Desktop\LLMs-from-scratch"🗂️ “Let’s walk into the room where all my GenAI files are stored.”
🧩 Step 3: Build a safe Python workspace
🧪 “Make me a fresh lab where I can mix Python ingredients without messing up the kitchen.”
This creates a
.venvfolder with Python 3.11.🧩 Step 4: Step into the lab
🧼 “Put on my lab coat and start working inside the safe zone.”
Now every Python command uses this clean environment.
🧩 Step 5: Remove broken tools from earlier
🧹 “Throw away any old or broken versions of my GenAI package.”
🧩 Step 6: Create a special folder for my package
📦 “Make a box called
pkgto hold all my GenAI chapters.”🧩 Step 7: Move my code into the box
Move-Item llms_from_scratch pkg📤 “Put my GenAI code inside the
pkgfolder so Python can find it.”🧩 Step 8: Install my code so Python knows it
uv pip install -e .🔧 “Tell Python: this is my GenAI package, and I might change it later—please keep watching.”
🧩 Step 9: Make every folder readable by Python
🧠 “Put a magic sticker (
__init__.py) on every folder so Python knows it’s part of the team.”Repeat this for:
✅ Now every chapter and subfolder is importable.
🧩 Step 10: Rename folders that confuse Python
🚫 Python doesn’t like folders starting with numbers.
✅ Renaming fixed the error: “invalid decimal literal”
🧩 Step 11: Find the tools I need
🔍 “Where’s the
generatefunction hiding?”Found it in
main_code/gpt_generate.py🧩 Step 12: Fix broken imports
In
gpt_generate.py, change:to:
In
app.py, change:to:
🧩 “Tell Python exactly where to find my tools.”
🧩 Step 13: Fix the model file path
In
app.py, change:to:
📁 “Show Python the correct path to my trained model file.”
🧩 Step 14: Launch Chainlit!
🚀 “Start the GenAI app and open the user interface!”
✅ It worked! Chainlit opened at
http://localhost:8000🖼️ About the Image I Uploaded
The image shows a Chainlit UI giving some answers like:
🎉 Final Result
ch02toch07are modular and importableBeta Was this translation helpful? Give feedback.
All reactions