Skip to content

Ritviks21/Project-Krishi-Q

Repository files navigation

The Sahyadri Strategist Project Banner

The Sahyadri Strategist

An AGI-Powered Strategic Forecaster for Complex Agricultural Crises

Python Version Streamlit Qiskit Gemini

Live DemoOur JourneyKey FeaturesTech StackContribute


🚀 Live Demo

Streamlit App

Click the badge above or follow this link to interact with the live application: https://ritviks21-maharashtra-oracle-app-forivi.streamlit.app/

Project Demo GIF


📖 Project Overview

The Sahyadri Strategist is a state-of-the-art strategic forecasting tool built to simulate the complex, cascading effects of overlapping crises on a regional agricultural system. By fusing an interactive classical model, a quantum simulation engine, and a powerful generative AI, this project moves beyond simple prediction to provide actionable, strategic advice for policymakers.


🚀 Our Journey: The Story of the Project

This project evolved through three distinct phases, each teaching a valuable lesson about building intelligent systems.

V1: The Simple Calculator - A Deterministic Start
Our first version was a classical model that could only handle single, isolated events. It was a simple `if-this-then-that` calculator.

💡 **Lesson Learned:** Real-world crises are complex, overlapping, and unpredictable. A simple calculator cannot capture the "ripple effect."
V2: The Quantum Leap - Seeing the Ripple Effect
We rebuilt the core using **Qiskit** to create a "Quantum Battlefield." By entangling variables like Monsoon, Yield, and Demand, we could finally simulate the cascading impact of multiple, simultaneous events. The model became powerful, but its output was raw probability data—difficult for a human to interpret.

💡 **Lesson Learned:** Powerful simulation is useless without powerful interpretation. Data needs a storyteller to become wisdom.
V3: The AGI Strategist - The Final, Intelligent Core
This final version integrated **Google's Gemini** not as a simple reporter, but as an autonomous strategic advisor. The AI's task is to receive the complex probabilistic data from the quantum simulation and translate it into a high-level strategic briefing, complete with risk analysis and policy recommendations.

✅ **The Result:** A true strategic tool that doesn't just predict the future but helps you shape it, demonstrating a complete pipeline from user-defined scenario to actionable, AI-generated strategy.

✨ Key Features

  • Interactive Scenario Builder: Set initial conditions using historical data presets or manually define a custom baseline with interactive widgets.
  • Complex Crisis Simulation: A multi-select interface allows for combining multiple, overlapping events into a single simulation.
  • Quantum "Ripple Effect" Engine: Uses a Qiskit-based quantum circuit to model the non-linear, second-order effects of crises.
  • AI-Powered Strategic Briefings: The final output is a full strategic report containing an executive summary, risk analysis, and actionable policy recommendations.

🛠️ Tech Stack

Streamlit Qiskit Gemini Python Pandas

🚀 Getting Started

Click here for instructions to run this project yourself.
  1. Clone the Repository

    git clone [https://github.com/Ritviks21/maharashtra-oracle.git](https://github.com/Ritviks21/maharashtra-oracle.git)
    cd maharashtra-oracle
  2. Install Dependencies

    pip install -r requirements.txt
  3. Set Up API Key Create a .streamlit/secrets.toml file and add your Google Gemini API key:

    GEMINI_API_KEY = "YOUR_API_KEY_HERE"
  4. Run the App

    streamlit run app.py

🤝 How to Contribute

Contributions are always welcome! This project demonstrates a unique proof-of-concept, and there are many ways to expand on it.

Areas for Contribution

  • Expand the Quantum Model: Add more qubits to represent new variables (e.g., Transportation, Global Prices) and design their entangled relationships.
  • Integrate Real-Time Data: Connect the app to a live weather API to set the initial monsoon state based on real-time data.
  • Enhance the AI's "Tools": Give the AI more "tools" to call, such as a function to look up historical data or current market prices, to enrich its strategic analysis.

🔗 Connect with Me

Your Github Your Twitter Your Hugging Face Your LinkedIn

About

An AGI-powered strategic forecaster fusing a Qiskit quantum simulation engine with Google Gemini to model cascading ripple effects and policy recommendations for regional agricultural crises.

Topics

Resources

License

Stars

Watchers

Forks

Contributors