# krishnaik06/generative-ai-with-cloud architecture

> Architecture diagram of the GitHub repository krishnaik06/generative-ai-with-cloud, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/krishnaik06/generative-ai-with-cloud
- Repository: https://github.com/krishnaik06/generative-ai-with-cloud

## Overview

2. A blog-generation component – found under “Blog generation in aws” which includes an “app.py” (likely implementing a Flask or FastAPI web server) and a “requirements.txt”. This component is intended to deliver the generative AI’s output (possibly blog content) as part of a full-stack web application running on AWS.

The README itself outlines the prerequisites and curated video playlists covering Python, Flask, FastAPI, Machine Learning, Deep Learning, NLP, and Generative AI. This context implies that the project is educational and practical in nature – demonstrating how to deploy generative models on cloud services, with a clear separation between model experimentation (AWS SageMaker) and application deployment (blog-generation web app).

##### Main Components
- AWS SageMaker Environment: Represent this as the “Model Development/Inference Environment” where you perform experimentation with generative models (e.g., using Falcon40B) through interactive notebooks and Python scripts.
- Blog Generation Service: Include a “Web Application Component” (likely built using Flask/FastAPI since the README emphasizes these frameworks) that serves as the interface for generating and displaying blog content.
- Cloud Infrastructure: Show that these components are deployed on AWS (with references also to Azure in the documentation) to emphasize cloud-based deployment.
- External Educational/Reference Resources: Optionally, note the external learning resources (as per the README) which support the technology and approach but are not part of the actual deployment.

##### Detail the Relationships and Interactions
- If there is any preprocessing or data handling, represent any intermediary layers (although not explicitly seen, it might be implied with test scripts and configuration files).
- Data flow paths showing that client requests (blog content requests from end users) hit the blog web service, which then interacts (calls/invokes) with the generative model on AWS SageMaker for predictions.

##### Architectural Patterns and Design Principles
- Separation of Concerns: Clearly separate the model development (in Jupyter notebooks and test.py under AWS SageMaker) from application serving (app.py under Blog generation in aws).
- Cloud-Native Patterns: Emphasize deployment on AWS (and potentially Azure) by labeling the corresponding cloud services (e.g., AWS SageMaker, EC2 or container services for the blog web app).

##### Incorporate Technologies and Frameworks
- Python as the core programming language.
- Jupyter Notebooks: Used for interactive model testing and experimentation.
- Flask/FastAPI: Likely frameworks for the generation and serving of blog content (check the “app.py” and the dedicated YouTube playlists in the README for verification).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Client Layer
    subgraph "Client Layer"
        Client["Client Requests"]:::client
    end

    %% Blog Generation Service
    subgraph "Blog Generation Service"
        webapp["Web Server - Flask/FastAPI App"]:::webapp
        deps["Dependencies - requirements.txt"]:::deps
    end

    %% AWS SageMaker Environment (Model Experimentation & Inference)
    subgraph "AWS SageMaker - Model Experimentation & Inference"
        nb1["Jupyter Notebook - Untitled (2)"]:::notebook
        nb2["Jupyter Notebook - Falcon40B instruct-notebook-full"]:::notebook
        testScript["Test Script - test.py"]:::script
    end

    %% Cloud Infrastructure
    subgraph "Cloud Infrastructure"
        cloud["AWS Cloud / Azure Reference"]:::cloud
    end

    %% Connections
    Client -->|"sends_request"| webapp
    webapp -->|"calls_inference"| nb2
    webapp -->|"deployed_on"| cloud
    nb2 -->|"deployed_on"| cloud
    nb1 --- nb2
    nb2 --- testScript

    %% Click Events
    click nb1 "https://github.com/krishnaik06/generative-ai-with-cloud/blob/main/AWS sagemaker/Untitled (2).ipynb"
    click nb2 "https://github.com/krishnaik06/generative-ai-with-cloud/blob/main/AWS sagemaker/falcon40B-instruct-notebook-full.ipynb"
    click testScript "https://github.com/krishnaik06/generative-ai-with-cloud/blob/main/AWS sagemaker/test.py"
    click webapp "https://github.com/krishnaik06/generative-ai-with-cloud/blob/main/Blog generation in aws/app.py"
    click deps "https://github.com/krishnaik06/generative-ai-with-cloud/blob/main/Blog generation in aws/requirements.txt"

    %% Styles
    classDef client fill:#FFDDC1,stroke:#333,stroke-width:2px;
    classDef webapp fill:#C6E2FF,stroke:#1f77b4,stroke-width:2px;
    classDef deps fill:#B0E0E6,stroke:#1f77b4,stroke-width:2px;
    classDef notebook fill:#FFD700,stroke:#d4af37,stroke-width:2px;
    classDef script fill:#FFA500,stroke:#d2691e,stroke-width:2px;
    classDef cloud fill:#98FB98,stroke:#32CD32,stroke-width:2px;
```
