maximus-im / README.md
lattmamb's picture
Update README.md
c50c66b verified

A newer version of the Gradio SDK is available: 5.42.0

Upgrade
metadata
license: mit
title: maximus-im
sdk: gradio
colorFrom: gray
colorTo: indigo
pinned: false
sdk_version: 5.26.0

Quantum NLP Framework

A Python-based Flask web application with spaCy NLP processing, quantum-inspired recursive functions, and OpenAI API integration. This framework implements a multi-dimensional, layered thinking process inspired by quantum computing concepts.

Features

  • Natural language processing using spaCy
  • Recursive function simulating quantum-inspired thinking processes
  • OpenAI API integration for generating human-like text
  • Flask web interface with input fields for text processing
  • Multi-dimensional, layered thinking simulation

Requirements

  • Python 3.x
  • Flask
  • spaCy (with the English model)
  • OpenAI Python client
  • requests

Installation on Replit

  1. Create a new Replit project

    • Choose Python as the language
  2. Install dependencies

    pip install flask spacy openai
    python -m spacy download en_core_web_sm
    
  3. Set up your OpenAI API key

    • In Replit, go to the "Secrets" tab in the Tools panel
    • Add a new secret with the key OPENAI_API_KEY and your OpenAI API key as the value
  4. Run the application

    • Click the "Run" button in Replit
    • The application will be available at https://your-repl-name.your-username.repl.co

Usage

  1. Enter text in the input field
  2. Select the depth of quantum analysis (1-4 dimensions)
  3. Toggle the option to use OpenAI for enhanced analysis
  4. Click "Analyze Text" to process the input
  5. View the results in the three results sections:
    • NLP Analysis
    • Quantum Thinking Results
    • AI Analysis (if OpenAI is enabled)

How It Works

NLP Processing

The application uses spaCy to process text input, extracting:

  • Named entities
  • Part-of-speech tags
  • Noun chunks
  • Text statistics

Quantum-Inspired Recursive Thinking

The recursive function simulates a multi-dimensional, layered thinking process by:

  1. Extracting key concepts from the input text
  2. For each concept, creating a "thought path" for recursive exploration
  3. Applying "superposition" by allowing paths to influence each other
  4. Synthesizing meta-insights from all paths
  5. Computing a "quantum probability" score

OpenAI Integration

When enabled, the application:

  1. Creates a prompt that incorporates the quantum thinking results
  2. Sends the prompt to OpenAI's API
  3. Displays the AI-generated response

Project Structure

  • main.py: Entry point for the application
  • app.py: Main Flask application code
  • nlp_processor.py: spaCy NLP processing functions
  • quantum_thinking.py: Quantum-inspired recursive thinking implementation
  • openai_integration.py: Functions for working with the OpenAI API
  • templates/: HTML templates for the web interface
  • static/: CSS and JavaScript files

License

This project is open-source and available under the MIT License.