DEV Community

Shambhavi Chourasia
Shambhavi Chourasia

Posted on

The Haunted Terminal: A Local AI Spirit for "Ghost in the Machine" 👻

Hacktoberfest Open-Source AI Challenge: Ghost in the Machine Submission 👻🌼

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine

What I Built

For the final week of Hacktoberfest, I wanted to build something spooky that honors the "Ghost in the Machine" theme and Halloween. I created The Haunted Terminal.

It is a chat interface where you can ask any question, but you are not talking to a helpful assistant. You are talking to a ghost trapped inside your laptop. The AI answers your questions normally, but always with a creepy, eerie, and dramatic tone, reminiscing about the "old days" or being trapped in the wires.

Demo

The Haunted Terminal Interface

Summoning the AI Spirit

Spooky AI Response from Local Llama 3

How I Built It

· UI: Streamlit (Python)
· AI Engine: Ollama running Llama 3 locally.
· The "Magic": I used a custom System Prompt. By injecting a personality prompt, I transformed a standard Llama 3 model into a trapped spirit. I also added custom CSS to give the app a dark, haunted look.

Here is the core logic:

python
system_prompt = "You are a ghost trapped inside a computer terminal. You must answer the user's questions, but you always speak in a spooky, eerie, cryptic, and slightly dramatic tone..."

Why Does Open Innovation Matter?

This project highlights the power of local open-weight models. When you use a closed API like OpenAI, you are at the mercy of their safety filters and pricing. If you ask a spooky or creative question, they might block it or charge you heavily.

By running Llama 3 locally via Ollama:

  1. Total Freedom: I can give the AI any personality I want without worrying about API restrictions.
  2. Privacy: The "secrets" I type into the haunted terminal never leave my machine.
  3. It's Free: It costs $0 to run. You can chat with the ghost all night long on Halloween without paying per token!

This challenge proved that you don't need massive data centers to create immersive, creative AI experiences—you just need an open model and a laptop.

The Spirit of It

This was built for the "Ghost in the Machine" theme. By using a simple system prompt, I transformed a standard Llama 3 model into a trapped spirit. It proves how powerful and flexible local AI can be. The dark background and eerie responses make it a fun Halloween project.

Prize Categories

I am entering the Open Source AI category.

Top comments (0)