-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
306 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
.DS_Store | ||
./models | ||
models/* | ||
temp_audio.wav |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,9 +12,15 @@ Interact with a hosted version of this app live at [<https://robotf.ai/Halloween | |
- [Features](#features-️🕯️) | ||
- [Getting Started](#getting-started-🧹) | ||
- [Docker Compose with LocalAI](#option-1-local-ai-with-docker-compose-🖤) | ||
- [Docker from DockerHub](#option-2-docker-hub-container-👻) | ||
- [Direct Python Development](#option-3-local-development-👨💻) | ||
- [Docker from DockerHub](#option-2-docker-hub-container-👻) | ||
- [Direct Python Development](#option-3-local-development-👨💻) | ||
- [Running the App](#running-the-app) | ||
- [OpenAI](#openai) | ||
- [Docker Compose](#docker-compose) | ||
- [Using LocalAI/LMStudio/Ollama/etc locally](#using-localailmstudioollamaetc-locally) | ||
- [Using a custom endpoint URL](#using-a-custom-endpoint-url) | ||
- [Development Setup](#development-setup) | ||
- [Text to Speech](#text-to-speech) | ||
- [Contact](#contact) | ||
- [Contributing](#contributing-👥) | ||
- [License](#license-📜) | ||
|
@@ -24,17 +30,28 @@ Interact with a hosted version of this app live at [<https://robotf.ai/Halloween | |
|
||
Welcome to the eerie realm of the Spooky Streamlit Storyteller! This is no ordinary codebase; it's a haunted mansion of horror stories, where AI and LLMs (Large Language Models) come together to weave chilling tales that will send shivers down your spine. If you're brave enough to conjure up a streaming app with Streamlit that generates spooky Halloween stories, you've just unlocked the creaky front door. | ||
|
||
In reality this is just an example of how to integrate LLM's with Streamlit using python, langchain, requests, and even LocalAI (if you don't want to waste money on OpenAI credits.). This is just a demo to show people what is possible. | ||
|
||
## About the Project 👻 | ||
|
||
This project is a digital ouija board, channeling the supernatural power of AI to craft horror stories that are as dynamic as they are dreadful. With Streamlit's enchanting capabilities, we've bewitched an app that streams terror with the grace of a ghost gliding through the night. | ||
|
||
## Features 🕯️ | ||
|
||
AI-Powered Storytelling: Summon the spirits of AI to generate tales of terror on the fly. | ||
|
||
Bring your own AI/LLM with LocalAI (or other custom OpenAI compatible API) or use OpenAI | ||
|
||
Interactive UI: Choose your own adventure by selecting story elements that shape your frightening fable. | ||
|
||
Real-time Streaming: Experience the horror unfold in real-time as the story mutates before your terrified eyes. | ||
|
||
Text to Speech: Don't just read it the story, hear it told to you using TTS on OpenAI or LocalAI | ||
|
||
Halloween Humor: Because even in the darkest depths, a chuckle can be the most terrifying sound. | ||
|
||
 | ||
|
||
## Getting Started 🧹 | ||
|
||
Choose your path to horror story glory with one of these three enchanting options: | ||
|
@@ -129,6 +146,84 @@ OR | |
|
||
Set your key for OpenAI, or a custom address for your OpenAI compatiable API LLM endpoint. | ||
|
||
## Running the Application | ||
|
||
This is dependant on which API provider you are going to use: | ||
|
||
Set your specific settings (see below for basic guides) | ||
|
||
 | ||
|
||
Hit the `Generate Story` button | ||
|
||
 | ||
|
||
If you want to hear the story spoken to you, hit the `Speak it to Me` button | ||
|
||
 | ||
|
||
### OpenAI | ||
|
||
Set your OpenAI API Key at the top left | ||
|
||
Select your LLM model (gpt-4) | ||
|
||
Select your TTS model (tts-1) | ||
|
||
Select your voice (you can change this later to try multiple voices) | ||
|
||
Hit the `Generatate Story` button and watch it go. | ||
|
||
Once the story is done generating if you want you can hit the `Speak it to me button` to generate and play the Text to Speech. | ||
|
||
### Docker Compose | ||
|
||
Leave the OpenAI API Key at the top left blank | ||
|
||
Select the `http://localai:8080/v1` endpoint (internal docker networking) | ||
|
||
Select your LLM model (example: gpt-4) | ||
|
||
Select your TTS model (example: tts-1) | ||
|
||
Select your voice (you can change this later to try multiple voices) | ||
|
||
Hit the `Generatate Story` button and watch it go. | ||
|
||
Once the story is done generating if you want you can hit the `Speak it to me button` to generate and play the Text to Speech. | ||
|
||
### Using LocalAI/LMStudio/Ollama/etc locally | ||
|
||
Leave the OpenAI API Key at the top left blank | ||
|
||
Select the `http://localai:8080/v1` endpoint (internal docker networking) | ||
|
||
Select your LLM model (example: gpt-4) | ||
|
||
Select your TTS model (example: tts-1) | ||
|
||
Select your voice (you can change this later to try multiple voices) | ||
|
||
Hit the `Generatate Story` button and watch it go. | ||
|
||
Once the story is done generating if you want you can hit the `Speak it to me button` to generate and play the Text to Speech. | ||
|
||
### Using a custom endpoint URL | ||
|
||
Leave the OpenAI API Key at the top left blank | ||
|
||
Select the `http://localai:8080/v1` endpoint (internal docker networking) | ||
|
||
Select your LLM model (example: gpt-4) | ||
|
||
Select your TTS model (example: tts-1) | ||
|
||
Select your voice (you can change this later to try multiple voices) | ||
|
||
Hit the `Generatate Story` button and watch it go. | ||
|
||
Once the story is done generating if you want you can hit the `Speak it to me button` to generate and play the Text to Speech. | ||
|
||
## Development Setup | ||
|
||
This repo uses things such as precommit, task, and brew (for Mac) | ||
|
@@ -169,6 +264,15 @@ with just plain streamlit | |
streamlit run RoboTF_Halloween_Stories.py | ||
``` | ||
|
||
## Text to Speech | ||
|
||
For OpenAI select the TTS-1 model | ||
|
||
For using LocalAI if you want extra voices, just copy the `voice_models_localai/tts-1.yaml` to the `models/` directory and startup (or restart LocalAI container). | ||
This uses Piper under the hood with LocalAI. | ||
|
||
Then you should be able to use the full selection of voices in the menu. | ||
|
||
## Contact | ||
|
||
<[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"name": "robotf-halloween-stories", | ||
"version": "v0.0.3" | ||
"version": "v0.0.4" | ||
} |
Oops, something went wrong.