跳到正文
DEV Community· Muhammad Abdullah·· 3 小時前AI 評分26

Spookify:鬼故事生成器

Spookify: The Ghost Story Generator

AI 導讀

作者開發了 Spookify,這款網頁應用程式使用 Llama 3,將日常活動描述改寫成兩段恐怖故事。它以 Gradio 建立介面,透過 Groq API 呼叫開放權重模型 llama3-8b-8192 生成文字,毋須在本機下載大型模型權重。

正文

Muhammad Abdullah

Welcome to my submission for Week 4 of the Hacktoberfest Open-Source AI Challenge! The theme this week is "Ghost in the Machine," which perfectly aligns with the spooky season.

The Inspiration
For Halloween, I wanted a fun way to bring a little spookiness into everyday life. The challenge prompt mentioned building a ghost story generator, so I decided to build a tool that takes the most boring, mundane parts of your day and turns them into terrifying tales.

The Solution: Spookify
I built Spookify, a lightweight web application that takes a short input like "I was just sitting in my room playing Tekken Tag Tournament" and uses Llama 3 to instantly generate a creepy, two-paragraph horror story based on that exact action. It completely transforms your normal day into a nightmare!

How I Built It
I built this on my Ubuntu setup using the following stack:

UI Framework: Gradio to create a fast, clean web interface.

AI Engine: The open-weight Llama 3 model (llama3-8b-8192).

Inference: I used the Groq API to get lightning-fast text generation without needing to download massive model weights directly to my local machine.

Why Open Innovation Matters
Using an open-weight model like Llama 3 is crucial for creative projects like this. When we rely on open models, we are not locked into restrictive corporate ecosystems that might censor or limit creative storytelling. Furthermore, by accessing open innovation via lightweight APIs, developers can build fun, highly responsive tools on everyday laptops without needing thousands of dollars in GPU hardware. Open source ensures that AI remains accessible for everyone's creative ideas, even the spooky ones!

Here is the interface in action!

You can check out the full code in my GitHub repository here:https://github.com/AbdullahRaoDev/Spookify.git

來源:DEV Community · dev.to