Replies: 2 comments 3 replies
-
Ah sorry, a while back, I cleaned up the code a bit and moved it into the What you could do is, in the main folder of this repo, run pip install -e . or, if you are using uv add . --dev This will install the You can then also still make changes to your local code in (Alternatively, you could also install it from pypi via Please let me know if this works for you. |
Beta Was this translation helpful? Give feedback.
-
Hi Sebastian, Thank you so much for your previous response and for maintaining such a fantastic repository. Iβve been following your book and YouTube videos closely, and Iβm really excited to learn about LLMs and generative AI. Iβm new to coding and Python, and while Iβve learned a lot from your materials, Iβve been struggling to get the project running smoothly on my Windows machine. π§ͺ What Iβve Triedβ Environment Setup
β Package Installation
π My Project StructureHereβs how my local copy of the repo is organized:
Iβm not sure if the presence of both
π§ͺ Chainlit Error ReportWhen I tried running the Chainlit app from chapter 7 (
Hereβs the full traceback:
I tried running it again and got the same error on line 17. Iβve tried installing the package, adjusting paths, and even manually modifying
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
π§΅ Chainlit App Not Launching β LLMs-from-scratch
ch07/app.py
Import FailuresI'm currently working through the LLMs-from-scratch project and trying to run the Chainlit interface for
ch07
using:LLMs-from-scratch/llms_from_scratch> chainlit run ch07/app.py
Chainlit initializes and creates translation files:
But then crashes with:
I also tried:
Still got:
After correcting the import to lowercase (
llms_from_scratch
), I hit another error:Then I tried to run the file directly:
And got:
Also tried:
But got:
Finally, after correcting the import path again, I hit this:
π My Conditions
llms_from_scratch
folder.app.py
exists and is being picked up.app.py
seem to mismatch the actual folder structure.GPTModel.py
is either missing or misnamed inch04
.generate
is not defined or exposed inch05/gpt_download.py
.π§± What I Need Help With
ch07/app.py
without modifying the original imports?GPTModel
defined somewhere else or exposed differently?generate
supposed to be defined ingpt_download.py
, or is it a wrapper thatβs missing?Any working setups, guidance, or upstream fixes would be appreciated. Iβll keep adding logs if needed. Thanks in advance β Iβm still learning and trying to understand how all these pieces fit together.
Beta Was this translation helpful? Give feedback.
All reactions