https://github.com/billy-enrizky/chat-with-image
This project allows you to have a conversation with an AI assistant that can process both images and text. How it works: Image Upload: Upload an image file (jpg, jpeg, png) that will be processed by the model. Image Conversion: The image is converted to a base64-encoded string for integration into the chat.
https://github.com/billy-enrizky/chat-with-image
chat-image ibm-cloud ibm-watson ibmwatson llama meta-llama streamlit
Last synced: 5 months ago
JSON representation
This project allows you to have a conversation with an AI assistant that can process both images and text. How it works: Image Upload: Upload an image file (jpg, jpeg, png) that will be processed by the model. Image Conversion: The image is converted to a base64-encoded string for integration into the chat.
- Host: GitHub
- URL: https://github.com/billy-enrizky/chat-with-image
- Owner: billy-enrizky
- License: mit
- Created: 2025-02-16T20:26:00.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-02-16T23:18:14.000Z (8 months ago)
- Last Synced: 2025-02-17T00:20:43.027Z (8 months ago)
- Topics: chat-image, ibm-cloud, ibm-watson, ibmwatson, llama, meta-llama, streamlit
- Language: Python
- Homepage: https://chat-with-images-billy.streamlit.app/
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Chat With Images - AI Assistant
## App User Interface
## Overview
This project allows users to have a conversation with an AI assistant that can process both text and images using IBM's AI API. The assistant can analyze uploaded images and provide responses based on user interactions.## Features
- **Image Upload:** Users can upload images (JPG, JPEG, PNG) for processing.
- **Chat Interface:** Engages in text-based conversations.
- **Image Processing:** Converts images into base64 format for analysis.
- **IBM Watson Integration:** Utilizes IBM Watson API for intelligent responses.
- **Customization Options:** Includes adjustable max tokens, decoding methods, and repetition penalties.
- **Dark Mode Support:** Optional dark mode for better UI experience.
- **Download Chat History:** Save conversations as a text file.
- **Clear Chat:** Reset the chat session.## Installation
1. Clone the repository:
```bash
git clone https://github.com/billy-enrizky/chat-with-images.git
cd chat-with-images
```
2. Install dependencies:
```bash
pip install -r requirements.txt
```
3. Create a `secrets.toml` file inside the `.streamlit` folder and add your IBM API key:
```toml
[secrets]
IBM_API_KEY = "your_ibm_api_key"
```
4. Run the application:
```bash
streamlit run app.py
```## Usage
1. Open the Streamlit app in your browser.
2. Upload an image and/or enter text messages.
3. The AI assistant will process the input and generate responses.
4. Customize settings via the sidebar.
5. Download chat history if needed.## Technologies Used
- **Python**
- **Streamlit**
- **IBM Watson API**
- **PIL (Pillow)**
- **Base64 Encoding**
- **Requests Library**## Future Improvements
- Support for multiple image uploads.
- Enhanced UI with more front-end features.
- Additional AI models for better image and text understanding.## License
This project is licensed under the MIT License.