--- title: Gemma-2 Multimodal Chat description: A sophisticated Gradio-based chat application featuring multimodal capabilities with Google's Gemma-2 model. emoji: 🚀 colorFrom: blue colorTo: purple sdk: gradio sdk_version: 4.0.0 python_version: 3.9 pinned: false license: mit --- # 🚀 Gemma-2 Multimodal Chat Application A sophisticated Gradio-based chat application featuring multimodal capabilities with Google's Gemma-2 model. ## ✨ Features - 💬 **Interactive Chat Interface**: Persistent conversation history with context awareness - 🖼️ **Vision Capabilities**: Upload and analyze images (note: Gemma-2 doesn't have native vision capabilities) - 📄 **File Processing**: Support for PDF and TXT file uploads with text extraction - 🧠 **Contextual Responses**: Maintains conversation context for follow-up questions - 🎨 **Modern UI**: Clean, responsive interface built with Gradio ## 📖 How to Use ### Basic Chat 1. Type your message in the text input box 2. Click "Submit" or press Enter 3. View the AI response in the chat history ### Image Analysis 1. Upload an image using the image upload component 2. Type a question about the image 3. Submit to get AI-powered image analysis (note: Gemma-2 doesn't have native vision capabilities) ### File Processing 1. Upload a PDF or TXT file using the file upload component 2. Ask questions about the file content 3. The extracted text will be used as context for responses ### Advanced Features - **Persistent Context**: Previous conversations are remembered - **File Context**: Uploaded file content persists for follow-up questions - **Clear Chat**: Reset conversation history and uploaded files ## 🛠️ Technologies Used - **Frontend**: Gradio 4.0+ - **AI Model**: Google's Gemma-2-2B-IT - **File Processing**: PyPDF2 for PDFs, PIL for images - **Backend**: Python with Hugging Face Transformers ## 📄 License This project is licensed under the MIT License.