This is a submission for the Hacktoberfest Open-Source AI Challenge: Week 4
What I Built
Every student has the same problem: notes pile up, and we only open them the night before the exam.
Study Boss Battle fixes that by turning revision into a game. You upload your notes as a PDF, and an open-weight AI reads them and writes quiz questions. Then a monster appears.
- The monster and you both start with 90 HP.
- A right answer takes 30 HP from the monster.
- A wrong answer takes 30 HP from you.
- Defeat the monster to win. 🎉
It fits the Halloween theme in a simple way. Old notes that we forgot are "dead", and every battle brings them back to life.
Demo
GitHub: https://github.com/Mehak-Kuchchal/study-boss-battle
How It Works
- I upload a notes PDF.
-
pypdfreads the text from the PDF. - The text is sent to the open-weight model gpt-oss:120b through Ollama. I ask for 3 multiple choice questions in a fixed JSON format.
- Streamlit shows one question at a time with buttons.
- After each answer, the health bars update. The game remembers the HP using Streamlit's
session_state.
Tools used: Python, Streamlit, pypdf, Ollama, gpt-oss:120b.
Why Open Innovation Matters Here
- I can change the model any time. The AI is one line in my code. If a better open model comes out, I swap the name and nothing else breaks.
- No lock-in. My app doesn't depend on one company's closed model. If a service changes its rules or disappears, I can run the same model somewhere else.
- Privacy is a real concern. Notes can contain personal things. I used Ollama's cloud API to keep setup simple, so right now my notes do go to that service. The big advantage of an open model is that my next step is possible: running it fully on my own laptop, so the notes never leave it. A closed model can't offer that.
What I Learned
This was my first time using Streamlit and reading PDFs with Python. The biggest lessons:
- How to ask an AI for answers in a fixed format (JSON) so my code can use them.
- How to keep a game's state between button clicks.
- How to fix small errors one by one. I hit a few, like a terminal stuck in the Python shell and a Windows command not being found, and each one taught me something.
What's Next
- A named boss for each unit, like "Boss of Unit 3"
- A "New game" button and a final score
- More questions per round, and different difficulty levels
- Running the model fully on my laptop for complete privacy
Thanks for reading! If you try it with your own notes, I would love to hear how the battle went. 👹



Top comments (0)