{"id":19517297,"url":"https://github.com/agituts/ollama-vision-model-enhanced","last_synced_at":"2026-02-28T21:32:24.109Z","repository":{"id":262062504,"uuid":"886105221","full_name":"agituts/ollama-vision-model-enhanced","owner":"agituts","description":"This Streamlit application allows users to upload images and engage in interactive conversations about them using the Ollama Vision Model (llama3.2-vision). The app provides a user-friendly interface for image analysis, combining visual inputs with natural language processing to deliver detailed and context-aware responses.","archived":false,"fork":false,"pushed_at":"2024-11-11T14:10:28.000Z","size":43,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-23T10:51:30.644Z","etag":null,"topics":["ollama","vision"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agituts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-10T07:53:49.000Z","updated_at":"2025-05-17T13:29:22.000Z","dependencies_parsed_at":"2024-11-10T09:29:39.166Z","dependency_job_id":"5f2a37d1-448b-4c46-9528-d8e4fa4637ae","html_url":"https://github.com/agituts/ollama-vision-model-enhanced","commit_stats":null,"previous_names":["amaxkeylogger/ollama-vision-model-enhanced"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/agituts/ollama-vision-model-enhanced","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agituts%2Follama-vision-model-enhanced","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agituts%2Follama-vision-model-enhanced/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agituts%2Follama-vision-model-enhanced/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agituts%2Follama-vision-model-enhanced/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agituts","download_url":"https://codeload.github.com/agituts/ollama-vision-model-enhanced/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agituts%2Follama-vision-model-enhanced/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29952268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T18:42:55.706Z","status":"ssl_error","status_checked_at":"2026-02-28T18:42:48.811Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ollama","vision"],"created_at":"2024-11-11T00:01:31.487Z","updated_at":"2026-02-28T21:32:24.090Z","avatar_url":"https://github.com/agituts.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Enhanced Image Analysis with Ollama Vision Model\n\nThis Streamlit app allows users to analyze images using the Ollama Vision Model, with features such as conversation management.\n\n![2024-11-11_15-53-40](https://github.com/user-attachments/assets/17292e69-3a34-47fe-b860-3986cd1e2987)\n\n## Requirements\n\n- Python 3.x\n- Streamlit\n- Ollama\n- Pillow\n\n## Setup\n\n[![Introducing a chatgpt style conversational vision model](https://github.com/user-attachments/assets/36556c62-c347-46e7-aafc-8c17657cdf46)](https://www.youtube.com/watch?v=sdulVogM2aQ)\n\n\n\n1. **Clone the repository**:\n    ```bash\n    git clone https://github.com/agituts/ollama-vision-model-enhanced.git\n    cd ollama-vision-model-enhanced\n    ```\n\n2. **Set Up a Virtual Environmentt (Recommended)**:\n   \n   Create a virtual environment to isolate project dependencies.\n\n   - On Windows\n    ```bash\n    python -m venv venv\n    venv\\Scripts\\activate\n    ```\n   - On macOS/Linux\n    ```bash\n    python3 -m venv venv\n    source venv/bin/activate\n    ```\n\n4. **Install Python Dependencies**:\n\n   Install the required Python packages using pip:\n   \n    ```bash\n    pip install -r requirements.txt\n    ```\n    \n    If requirements.txt is missing or incomplete, install the packages manually:\n\n    ```bash\n    pip install streamlit ollama Pillow\n    ```\n\n5. **Install and Set Up Ollama**:\n   \n   - Download and Install Ollama: Visit https://ollama.com/ and follow the installation instructions for your operating system.\n  \n   - Verify Ollama Installation:\n   \n    ```bash\n    ollama version\n    ```\n\n6. **Pull the Required Ollama Model**:\n\n   - Pull the llama2:3b-vision model using Ollama:\n\n    ```bash\n    ollama pull llama2:3b-vision\n    ```\n\n7. **Start the Ollama server**:\n\n   - Start the Ollama server to enable communication with the model:\n\n    ```bash\n    ollama serve\n    ```\n   Tips:\n   \n   - Keep this terminal window open as the server needs to run continuously. You may open a new terminal window for the next steps.\n   - Also, in Windows, you will need to exit any instance of Ollama running in the taskbar.\n\n9. **Launch the App**:\n\n   - In a new terminal window (with your virtual environment activated), navigate to the project directory if you're not already there:\n     \n   ```bash\n    cd ollama-vision-model-enhanced\n    ```\n   - Launch the app:\n     \n    ```bash\n    streamlit run app.py\n    ```\n   This command will start the Streamlit server and open the app in your default web browser. If it doesn't open automatically, you can manually visit http://localhost:8501 in your browser.\n\n## Usage\n\n### Basic Operations:\n- Upload an Image: Use the file uploader to select and upload an image (PNG, JPG, or JPEG).\n- Add Context (Optional): In the sidebar under \"Conversation Management\", you can add any relevant context for the conversation.\n- Enter Prompts: Use the chat input at the bottom of the app to ask questions or provide prompts related to the uploaded image.\n- View Responses: The app will display the AI assistant's responses based on the image analysis and your prompts.\n\n### Conversation Management\n- Save Conversations: Conversations are saved automatically and can be managed from the sidebar under \"Previous Conversations\".\n- Load Conversations: Load previous conversations by clicking the folder icon (📂) next to the conversation title.\n- Edit Titles: Edit conversation titles by clicking the pencil icon (✏️) and saving your changes.\n- Delete Conversations: Delete individual conversations using the trash icon (🗑️) or delete all conversations using the \"Delete All Conversations\" button.\n\n## Troubleshooting\n\n### Issue: Ollama Model Not Found\n\nSymptoms:\n- Errors indicating the model cannot be found.\n- The app fails to generate responses.\n  \nSolution:\n- Ensure you've pulled the correct model with the exact name used in the code.\n- Double-check the model name in the process_image_and_text function:\n```python\n# Verify model name in code\nresponse = ollama.chat(\n    model='llama3.2-vision',   \n)\n```\n\n### Issue: Connection Error with Ollama Server\n\nSymptoms:\n- Errors related to connecting to the Ollama server.\n- The app is unable to process image and text prompts.\n  \nSolution:\n- Ensure the Ollama server is running in a terminal (ollama serve).\n- Verify there are no firewall restrictions blocking communication.\n- Restart the Ollama server if necessary.\n\n### Issue: Missing Python Packages\n\nSymptoms:\n- Import errors when running the app (e.g., ModuleNotFoundError).\n- The app fails to start due to missing packages.\n\nSolution:\n- Ensure all dependencies are installed:\n```bash\npip install -r requirements.txt\n```\n- If using a virtual environment, ensure it's activated when installing packages.\n\n### Issue: Streamlit App Not Starting\n\nSymptoms:\n- Terminal shows errors when running streamlit run app.py.\n- The app doesn't open in the browser.\n\nSolution:\n- Verify that you're in the correct directory (ollama-vision-model-enhanced).\n- Ensure app.py exists in the directory.\n- Check for syntax errors or typos in app.py.\n\n## Additional Tips\n\nOllama Server:\n- The Ollama server needs to run continuously while you're using the app.\n- If you close the terminal or the server stops, restart it with:\n```bash\nollama serve\n```\n\nRunning on a Different Port:\n- If you need to run the Streamlit app on a different port:\n```bash\nstreamlit run app.py --server.port \u003cPORT_NUMBER\u003e\n```\n\nStopping the App:\n- To stop the Streamlit app, press Ctrl+C in the terminal where it's running.\nUpdating the App Code:\n- If you make changes to app.py, Streamlit will prompt you to rerun the app. Click \"Rerun\" or press R in the terminal.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagituts%2Follama-vision-model-enhanced","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagituts%2Follama-vision-model-enhanced","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagituts%2Follama-vision-model-enhanced/lists"}