A newer version of the Gradio SDK is available:
6.6.0
license: mit
sdk: gradio
colorFrom: yellow
colorTo: green
sdk_version: 5.49.1
AI Assistant - Gradio Web Application
A comprehensive AI Assistant built with Gradio that combines chat functionality, notes management, reminders, document processing, and system monitoring in a single web interface.
π Features
- π¬ Smart Chat: Intelligent conversations with AI assistance
- π Notes Management: Create, edit, and organize your notes
- β° Reminders: Set and manage time-based notifications
- π Document Processing: Upload and analyze PDF, TXT, and Markdown files
- π» System Monitoring: Real-time system performance metrics
π οΈ Technology Stack
- Frontend: Gradio web interface
- Backend: Python with integrated AI capabilities
- AI Integration: Google Gemini API (configurable)
- Data Storage: JSON-based local storage
- File Processing: Support for multiple document formats
πββοΈ Quick Start
Local Development
Clone the repository
git clone <your-repo-url> cd ai-assistant-gradioInstall dependencies
pip install -r requirements.txtSet up environment variables (optional)
# Create .env file GEMINI_API_KEY=your_gemini_api_key_here OPENAI_API_KEY=your_openai_api_key_hereRun the application
python gradio_app.pyOpen your browser Navigate to
http://localhost:7860
Hugging Face Spaces Deployment
- Create a new Space on Hugging Face Spaces
- Select Gradio as the SDK
- Upload these files:
gradio_app.py(main application)requirements.txt(dependencies)README.md(this file)
- Add secrets (if using AI APIs):
GEMINI_API_KEY: Your Google Gemini API keyOPENAI_API_KEY: Your OpenAI API key
- Deploy and your app will be live!
π± Usage Guide
Chat Interface
- Type messages in the chat box to interact with the AI
- Use example prompts to get started quickly
- Chat history is automatically saved
Notes Management
- Create notes with titles and content
- View all notes in an organized display
- Delete notes by exact title match
- Notes persist between sessions
Reminders System
- Set reminders with specific dates and times
- Add descriptions for detailed reminders
- Mark reminders as completed
- View active and completed reminders
Document Processing
- Upload PDF, TXT, or Markdown files
- Get automatic analysis and content preview
- Files are saved for future reference
- Content can be queried through chat
System Monitoring
- View real-time system performance
- Monitor CPU, memory, and disk usage
- Track application statistics
- Auto-refresh every 30 seconds
π§ Configuration
Environment Variables
GEMINI_API_KEY: Google Gemini API key for AI responsesOPENAI_API_KEY: OpenAI API key (alternative AI provider)DEBUG: Set totruefor debug modePORT: Custom port (default: 7860)
Customization
The application is designed to be easily customizable:
- AI Provider: Modify the
_generate_mock_responsemethod to integrate with different AI services - Storage: Replace JSON storage with database integration
- UI Theme: Customize the Gradio theme and CSS
- Features: Add or remove tabs and functionality as needed
π Data Storage
Data is stored locally in JSON files:
data/notes.json: User notesdata/reminders.json: User remindersdata/chat_history.json: Chat conversation historydata/documents/: Uploaded documents
π Security Notes
- Data is stored locally and not shared externally
- API keys should be kept secure and not committed to version control
- File uploads are processed locally and stored in the data directory
- Consider implementing user authentication for production use
π Deployment Options
Hugging Face Spaces (Recommended)
- Free hosting for public applications
- Automatic deployment from Git repository
- Built-in secrets management
- Easy sharing and collaboration
Other Platforms
- Streamlit Cloud: Alternative free hosting
- Railway: Easy deployment with custom domains
- Heroku: Traditional cloud platform
- DigitalOcean: VPS deployment
- Local Server: Self-hosted solution
π€ Contributing
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
Development Setup
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
π License
This project is open source and available under the MIT License.
π Support
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
- Join the discussion in the community
π― Roadmap
Future enhancements planned:
- User authentication and multi-user support
- Database integration (PostgreSQL, MongoDB)
- Advanced AI integrations
- Mobile app companion
- API endpoints for external integration
- Advanced document analysis
- Email and calendar integration
- Voice commands and speech synthesis
- Plugin system for extensibility
Built with β€οΈ using Gradio and Python
Perfect for deployment on Hugging Face Spaces!