File size: 1,820 Bytes
7ac86fa
 
 
 
 
 
 
 
 
ad935de
7ac86fa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
title: Odyssey
emoji: 🎬
colorFrom: purple
colorTo: blue
sdk: static
app_build_command: npm run build
app_file: dist/index.html
pinned: false
short_description: AI choose your own adventure powered by GPT-4 and Sora2
---

# 🎬 Odyssey

An interactive video-based choose-your-own-adventure game powered by OpenAI's GPT-4 and Sora2.

[**Play Now!**](https://fraser-odyssey.static.hf.space/)

## Features

- **AI-Generated Narratives**: GPT-4 creates engaging first-person story experiences
- **Sora2 Video Generation**: Each scene is brought to life with AI-generated videos
- **Seamless Continuity**: Videos flow smoothly using the final frame of each clip as the starting point for the next
- **Interactive Choices**: Shape your adventure with meaningful decisions at each turn

## How to Use

1. Enter your OpenAI API key (requires access to GPT-4o and Sora2)
2. Start your adventure
3. Watch the AI-generated video scene
4. Make your choice to continue the story
5. Experience seamless video continuity as your story unfolds

## Architecture

- **Frontend**: This Space - Static Svelte 5 app
- **Backend**: [odyssey-backend](https://huggingface.co/spaces/Fraser/odyssey-backend) - Video upload service
- **Storage**: [odyssey-videos](https://huggingface.co/datasets/Fraser/odyssey-videos) - Dataset of generated videos

## Technical Details

- Built with Svelte 5 + TypeScript + Vite
- Uses OpenAI's GPT-4o for narrative generation
- Uses OpenAI's Sora2 for video generation
- Implements frame-based continuity inspired by [sora-extend](https://github.com/mshumer/sora-extend)
- Canvas API for final frame extraction
- Gradio client for optional video uploads

## Privacy

Your API key is stored only in your browser and never sent to our servers. All OpenAI API calls go directly from your browser to OpenAI.