🤖 Visual Imagery Playground: “An interactive Streamlit application powered by Vision Language Models.”
llava-hf/llava-1.5-7b-hf and deepseek-ai/deepseek-vl-7b-base models mid-session.
4-bit quantization via the bitsandbytes library, making it possible to run large 7-billion parameter models in resource-constrained environments.
📁 Visual_Analysis_Suite/
├── app.py # Application entry point (runs the Streamlit app)
├── config.py # Central configuration for models and page settings
├── requirements.txt
└── README.md
|
├── 📁 core/
│ ├── model_loader.py # Handles dynamic loading and caching of models
│ └── inference.py # Runs model-specific inference and performance tracking
│
├── 📁 ui/
│ ├── sidebar.py # Renders the sidebar for controls and settings
│ └── views.py # Renders the main interaction tabs and views
│
├── 📁 utils/
│ ├── session.py # Manages session state import/export
│ ├── helpers.py # Contains helper functions
│ └── prompting.py # Logic for creating model-specific prompts
│
├── 📁 data/
│ └── visual_suite_session.json # An exported session file
│
└── 📁 assets/
- Model Selection — Instantly switch between
Llava-1.5andDeepSeek-VLin the sidebar. - System Prompt — Customize the base instructions given to the model to alter its persona and response style.
- Max New Tokens — Control the maximum length of the generated response.
- Temperature — Adjust the randomness of the output; lower values are more deterministic, higher are more creative.
- Top-p (Nucleus Sampling) — Controls the diversity of the vocabulary used in the response.
- Repetition Penalty — Penalizes the model for repeating words or phrases, encouraging more varied output.
- Conversational Chat — Engage in a dynamic, multi-turn conversation about a single image.
- Deep Analysis — Use a toolkit of pre-defined prompts for specific tasks like object detection, scene description, or creative writing.
- Image Comparison — Upload two images side-by-side and ask comparative questions.
- Session Management — Export and import your entire session, including images and chat history, to a
JSONfile.
The Engine Room tab provides a look "under the hood" at the last model inference run.
| Metric | Description | Location |
|---|---|---|
Inference Time |
The total wall-clock time taken for the model to generate a response. | Engine Room |
Tokens/Second |
The speed of token generation, a key measure of performance. | Engine Room |
Full Prompt |
The exact, formatted prompt string sent to the model for analysis. | Engine Room |
Raw Model Output |
The complete, unparsed output from the model before formatting. | Engine Room |
Before you begin, ensure you have the following essential tools installed on your system.
- Python 3.11+: The core programming language.
- Git: For cloning the repository.
pipandvenv: Standard Python package and environment managers.- (Recommended) An NVIDIA GPU with CUDA installed to leverage 4-bit quantization.
This step-by-step guide will set up the entire project environment. Open your terminal or command prompt and execute the following commands.
1. Clone the Repository
First, clone this repository to your local machine.
git clone https://github.com/Sairaj213/Visual_Analysis_Suite.git2. Navigate to the Project Directory
Change into the newly created folder.
cd visual_analysis_suite3. Create and Activate a Virtual Environment
This isolates the project's dependencies from your system-wide Python installation.
- On Windows:
python -m venv venv venv\Scripts\activate
- On macOS / Linux:
(Your terminal prompt should now be prefixed with
python3 -m venv venv source venv/bin/activate(venv))
4. Install Required Dependencies
torch and packaging, setuptools, wheel, ninja package before installing requirements.txt.
pip install torchpip install packaging setuptools wheel ninjaThis command reads the requirements.txt file and installs all necessary libraries into your virtual environment.
pip install -r requirements.txtWith the setup complete, you are now ready to launch the Visual Analysis Suite.
streamlit run app.pyYour default web browser will automatically open a new tab with the application running. The first time you select a model, it will be downloaded and cached, which may take a few minutes.
The README.md looks way better in Visual Studio Code







