Spaces:
Sleeping
Sleeping
| title: PolyThink-YC | |
| emoji: 💭 | |
| colorFrom: gray | |
| colorTo: gray | |
| sdk: gradio | |
| sdk_version: "5.11.0" | |
| app_file: App.py | |
| pinned: true | |
| # PolyThink Multi-Agent Problem Solver | |
| A multi-agent system that uses multiple AI models to solve problems collaboratively through a consensus-based approach. | |
| ## Architecture | |
| PolyThink uses a multi-agent architecture with three specialized AI models: | |
| 1. **Solver Agents**: | |
| - **Cohere Command R**: A powerful reasoning model that generates concise solutions | |
| - **Llama 3.2 3B**: A Meta AI model that provides alternative perspectives | |
| 2. **Judge Agent**: | |
| - **Gemini 2.0 Flash Thinking**: Evaluates solutions from solver agents and determines if they agree | |
| The system works through multiple rounds of solution refinement until consensus is reached or the maximum number of rounds is completed. | |
| ## Setup | |
| 1. Clone this repository | |
| 2. Install dependencies: | |
| ```bash | |
| pip install -r requirements.txt | |
| ``` | |
| 3. Set up your API keys: | |
| - Get your Hugging Face token from [Hugging Face](https://huggingface.co/settings/tokens) | |
| - Get your Cohere API key from [Cohere](https://dashboard.cohere.com/api-keys) | |
| - Get your Gemini API key from [Google AI Studio](https://makersuite.google.com/app/apikey) | |
| ## Usage | |
| Run the application: | |
| ```bash | |
| python App.py | |
| ``` | |
| The application will launch a Gradio interface where you can: | |
| 1. Enter your API keys for each service | |
| 2. Input a problem or question | |
| 3. Choose the number of rounds for solution refinement (1-3) | |
| 4. Watch as multiple AI agents collaborate to solve the problem in real-time | |
| ## Process Flow | |
| 1. Two solver agents generate initial solutions independently | |
| 2. The judge agent evaluates if the solutions agree | |
| 3. If solutions disagree, solver agents refine their answers based on feedback | |
| 4. Process repeats until agreement is reached or max rounds completed | |
| 5. A final report is generated showing the problem-solving process | |
| ## Dependencies | |
| - gradio: Web interface framework | |
| - huggingface_hub: Access to Hugging Face models | |
| - cohere: Access to Cohere models | |
| - google-genai: Access to Google's Gemini models | |
| ## Note | |
| This application requires valid API keys for Hugging Face, Cohere, and Google Gemini. Make sure you have sufficient API credits for your usage. | |