A framework for generating fictional alternative internet experiences that explore how the web might have evolved under different technological and cultural scenarios.
AlternativeInternet generates immersive fictional web experiences based on different technological and design scenarios. It uses language models to create content that simulates alternative internet histories and interfaces, from retrofuturist computing to mystical networks.
- Sample and Custom Fictional Scenarios: Includes Retrofuturist, Etherweave, Cyberpunk, and Solarpunk scenarios as samples and allows users to create custom scenarios.
- Dynamic Content Generation: Creates realistic HTML webpages using language models, including by leveraging the Cerebras API for ultra-fast generation.
- Image Generation: Custom imagery that matches each alternative scenario, generated using the Flux Schnell model on the FAL API for ultra-fast image generation.
- Python 3.8+
- pip package manager
- Clone the repository:
git clone https://github.com/k-zubi/alternative-internet.git
cd alternative-internet- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
Create a
.envfile in the project root with your API keys:
OPENAI_API_KEY=your_openai_api_key # If using OpenAI
CEREBRAS_API_KEY=your_cerebras_api_key # If using Cerebras
FAL_KEY=your_fal_api_key # For image generation
python main.pyThis will start the web server on port 8080. Navigate to http://localhost:8080 in your browser to view the application.
python chat.pyThe application dynamically generates pages based on the URL paths:
- The main entry point is at the root URL (
/), which shows the home page for the current scenario - All other URLs are handled by a catch-all route that generates content based on the path
- Pages follow a typical web structure like
/tld/domain/page/subpage - Links within pages direct to other pages within the same fictional internet scenario
- The application handles image requests automatically, generating scenario-appropriate imagery
Access the admin interface at http://localhost:8080/admin to:
- View Current Scenario: See which alternative internet scenario is currently active
- Switch Scenarios: Choose from available scenarios (Etherweave, Retrofuturist, Cyberpunk, Solarpunk)
- Add Custom Scenarios: Create your own alternative internet scenario by providing:
- Scenario Name: A unique identifier for your scenario
- Short Description: Brief explanation of the scenario
- Full Scenario Description: Detailed guidelines for content generation
A "Browse Current Scenario" link takes you back to the main application with your selected scenario active.
AlternativeInternet/
├── main.py # Flask application entry point
├── chat.py # Chat interface
├── image_generator.py # Generates scenario-specific images
├── lm/ # Language model clients
│ ├── base_lm_client.py # Abstract base client interface
│ ├── openai_lm_client.py # OpenAI implementation
│ └── cerebras_lm_client.py # Cerebras implementation
├── prompts/ # Configuration for different scenarios
│ ├── retrofuturist.json
│ ├── etherweave.json
│ ├── cyberpunk.json
│ ├── solarpunk.json
│ └── scenario_manager.py
└── image_cache/ # Cached images
This project is licensed under the MIT License.