Skip to content
Binary file modified .DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "aiscreenplay"]
path = aiscreenplay
url = https://github.com/ruvnet/aiscreenplay.git
65 changes: 65 additions & 0 deletions AISCREENPLAY_SETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# AI Screenplay Generator Setup Guide

The aiscreenplay submodule has been configured and improved for easy use.

## Quick Start

1. **Navigate to the aiscreenplay directory:**
```bash
cd aiscreenplay
```

2. **Install dependencies:**
```bash
pip install -r requirements.txt
```

3. **Set your OpenAI API key:**
```bash
export OPENAI_API_KEY='your-api-key-here'
```

Get your API key from: https://platform.openai.com/api-keys

4. **Run the app:**
```bash
./run.sh
```

The app will open at http://localhost:8501

## Improvements Made

- ✅ Updated to use environment variables for API key (more secure)
- ✅ Modernized to use OpenAI ChatCompletion API (gpt-3.5-turbo)
- ✅ Added error handling and user-friendly messages
- ✅ Created requirements.txt for easy dependency management
- ✅ Added run.sh script for simplified startup
- ✅ Improved README with clearer instructions

## How to Use

Once the app is running:

1. Fill out the scene template with your screenplay details:
- Location (e.g., "Coffee shop - interior")
- Time of day (e.g., "Morning")
- Characters (e.g., "JOHN, 30s, detective")
- Objective (what should happen)
- Conflict (obstacles characters face)
- Key dialogue
- Important actions
- Emotional tone
- Additional notes

2. Adjust optional parameters:
- **Temperature**: Controls creativity (0.0-1.0, default 0.7)
- **P-Value**: Controls diversity (0.0-1.0, default 0.9)

3. Click "Generate Screenplay"

4. Copy the generated screenplay to your preferred screenwriting software

## Note

The improvements are stored locally in the submodule. If you want to keep them permanently, consider forking the original repository to your own GitHub account.
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,20 @@

![Script Buddy APP](script_buddy/images/app.gif)

## Project Structure
- *imsdb_scraper* contains the scrapy spider built to crawl IMSDB.com and download the film script data that is used to train our text generation model.
## Project Structure
- *imsdb_scraper* contains the scrapy spider built to crawl IMSDB.com and download the film script data that is used to train our text generation model.

- To run the scraper change directory to imsdb_scraper with `cd imsdb_scraper`. As I haven't built any pipelines currently to run the scraper and save it's output simply run `scrapy crawl scriptSpider -o scripts.json -t json` and for now manually move this output file to `script_buddy/data/` and you'll be good to go.
- To run the scraper change directory to imsdb_scraper with `cd imsdb_scraper`. As I haven't built any pipelines currently to run the scraper and save it's output simply run `scrapy crawl scriptSpider -o scripts.json -t json` and for now manually move this output file to `script_buddy/data/` and you'll be good to go.

- *script_buddy* contains the model fine tuning notebook, utility script parsing functions, tweepy bot code, and streamlit application code.
- If you'd like to run the streamlit app locally
- `git clone https://github.com/cdpierse/script_buddy_v2.git`
- *script_buddy* contains the model fine tuning notebook, utility script parsing functions, tweepy bot code, and streamlit application code.
- If you'd like to run the streamlit app locally
- `git clone https://github.com/cdpierse/script_buddy_v2.git`
- `pip install -r requirements.txt`
- `cd script_buddy`
- `streamlit run app.py`

- This should open an instance of the app for you to experiment with. Running it for the first time may take a
while as the model needs to be downloaded from huggingface's model hub.
- This should open an instance of the app for you to experiment with. Running it for the first time may take a
while as the model needs to be downloaded from huggingface's model hub.

- *aiscreenplay* contains an AI screenplay generator that creates formatted screenplays based on scene templates using OpenAI's API.
- See [AISCREENPLAY_SETUP.md](AISCREENPLAY_SETUP.md) for setup and usage instructions
Loading