# senthilthangaiah/detecttheft architecture

> Architecture diagram of the GitHub repository senthilthangaiah/detecttheft, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/senthilthangaiah/detecttheft
- Repository: https://github.com/senthilthangaiah/detecttheft

## Overview

This small Streamlit application lets a user upload an image, request an illegal-activity check, and view the model’s response. The app reads the upload, displays the image, and sends its bytes with a fixed query to Ollama’s LLava model; it then displays the returned text. The README documents image formats and the local LLava:13B setup. The single source file supports the shown calls; no separate storage or additional analysis stages are evident.

Main entry points: [`app.py`](https://github.com/senthilthangaiah/detecttheft/blob/master/app.py) (Streamlit app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_app["Streamlit app<br/>[app.py]"]
  node_image_handling["Image handling<br/>[app.py]"]
  node_results["Result display<br/>[app.py]"]
end

subgraph group_analysis["Image analysis"]
  node_activity_check["Activity check<br/>[app.py]"]
  node_llava["LLava via Ollama"]
end

node_user(("User"))

node_user -->|"uploads image"| node_app
node_app -->|"reads and displays"| node_image_handling
node_app -->|"requests analysis"| node_activity_check
node_activity_check -->|"sends image and query"| node_llava
node_llava -->|"returns response"| node_activity_check
node_app -->|"displays response"| node_results

click node_app "https://github.com/senthilthangaiah/detecttheft/blob/master/app.py"
click node_image_handling "https://github.com/senthilthangaiah/detecttheft/blob/master/app.py"
click node_activity_check "https://github.com/senthilthangaiah/detecttheft/blob/master/app.py"
click node_results "https://github.com/senthilthangaiah/detecttheft/blob/master/app.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_image_handling,node_results,node_user toneBlue
class node_activity_check,node_llava toneAmber
```

## Components

### User interface

- [Streamlit app](https://github.com/senthilthangaiah/detecttheft/blob/master/app.py): `app.py`
- [Image handling](https://github.com/senthilthangaiah/detecttheft/blob/master/app.py): `app.py`
- [Result display](https://github.com/senthilthangaiah/detecttheft/blob/master/app.py): `app.py`

### Image analysis

- [Activity check](https://github.com/senthilthangaiah/detecttheft/blob/master/app.py): `app.py`
- **LLava via Ollama**

### Other components

- **User**

## Connections

- User → Streamlit app: uploads image (evidence: `app.py`)
- Streamlit app → Image handling: reads and displays (evidence: `app.py`)
- Streamlit app → Activity check: requests analysis (evidence: `app.py`)
- Activity check → LLava via Ollama: sends image and query (evidence: `app.py`)
- LLava via Ollama → Activity check: returns response (evidence: `app.py`)
- Streamlit app → Result display: displays response (evidence: `app.py`)
