+
Skip to content

nigelp/mycrowd

Repository files navigation

mycrowdscreengrabsmall

MyCrowd

MyCrowd is a fun Windows based social media app that simulates interactions with local AI-powered personas. Users can create posts and receive comments from various AI personalities. The application leverages local AI models through Ollama to generate dynamic and contextually appropriate responses. Users can also add their own system prompts to play with the characteristics of the conversations (e.g. 'talk like a pirate').

NOTE: This app was wholly created for fun using the CodeCompanion.ai 'vibe-coding' tool with Anthropic Claude 3.7 Sonnet and OpenRouter.ai. Plus a little help from o3-mini and the very new quasar-alpha (which rocks!). :)

Warning: performance is controlled by the power of your computer. Expect some response lag on most normal strength PCs. Feel free to experiment with different sized Ollama models and app settings to see if you can reduce lag while retaining quality responses.

Features

  • Interactive Social Feed: Create posts and see AI-generated comments and interactions
  • Multiple AI Personas: Engage with various AI personalities, each with unique traits and communication styles
  • Anonymous Users: Configure anonymous users with different personality types for more diverse interactions
  • Customizable Settings: Change the AI model and system prompt to alter response styles
  • Conversation Memory: AI responses take into account the post content and previous comments
  • Response Variety: Built-in mechanisms to ensure varied and non-repetitive AI responses
  • Save and Load Conversations: Preserve and restore conversation threads

Prerequisites

  • Python 3.6 or higher
  • Flask
  • Ollama running locally for AI model inference
  • LLM models available in Ollama (the app uses "hf.co/bartowski/Darkest-muse-v1-GGUF:Q2_K" by default)

Installation

  1. Clone the repository:
git clone https://github.com/nigelp/mycrowd.git
cd MyCrowd
  1. Install dependencies:
pip install -r requirements.txt
  1. Make sure Ollama is installed and running on your system:
# Check if Ollama is running
curl http://localhost:11434/api/tags

Usage

  1. Start the application:
python app.py

Or use the provided batch file:

start.bat
  1. The application will automatically open in your default web browser at http://localhost:5000

  2. Create posts and interact with the AI personalities!

Configuration

AI Model

  1. Go to the Settings page by clicking "Settings" in the navigation bar
  2. Select a different model from the dropdown list (models are fetched from your local Ollama installation)
  3. Click "Save Model" to apply the change

System Prompt

  1. On the Settings page, edit the system prompt text area
  2. This prompt controls the general behavior of all AI personas
  3. Click "Save System Prompt" to apply changes

Anonymous Users

  1. On the Settings page, adjust the number of anonymous users (0-7)
  2. These users have randomly assigned personalities (angry, happy, sad, etc.)
  3. Click "Save Anon Users" to apply changes

Persistence

  • AI Model: Selected model is saved in model_settings.json
  • System Prompt: Custom prompt is saved in system_prompt.json
  • Anonymous Users: Settings are saved in anon_settings.json
  • Posts: Conversation threads can be saved in saved_posts.json using the "Save Posts" button

Building a Standalone Executable

A build script (build.bat) is included to create a standalone executable using PyInstaller:

build.bat

The executable will be created in the dist folder.

Project Structure

  • app.py: Main Flask application with API endpoints and logic
  • templates/: HTML templates for the web interface
  • static/: JavaScript, CSS, and assets
    • app.js: Frontend logic for the social feed
    • settings.js: Frontend logic for the settings page
    • style.css: Styling for the application
    • avatars/: Profile images for AI personas

License

MIT License

Acknowledgements

  • This project uses Flask for the web framework
  • AI responses are generated using Ollama
  • UI is built with vanilla JavaScript and CSS

About

MyCrowd AI social media app using Ollama local models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载