Advanced research tool that generates high-quality Q&A content with photorealistic images, optimized for Instagram stories and social media sharing.
Help us democratize research knowledge and make academic content accessible to everyone!
π¬ What we're building: A revolutionary offline-first research tool that transforms complex academic concepts into engaging, shareable content with stunning visuals.
π― Our mission: Bridge the gap between academic research and public understanding by creating beautiful, educational content that's perfect for social media sharing.
- π Educational Impact: Every sponsorship helps create more educational content for students, researchers, and curious minds worldwide
- π¬ Research Democratization: Making complex research accessible through beautiful visual storytelling
- π» Open Source Excellence: Supporting sustainable development of cutting-edge AI research tools
- π Global Knowledge Sharing: Enabling researchers to share their work in engaging, social media-friendly formats
Every contribution, no matter the size, makes a difference!
Your support enables us to:
- π Develop new research themes and content types
- π§ Improve AI model performance and reliability
- π± Create mobile apps and additional platforms
- π Build a global research content community
- π Provide free educational resources to students
Every contribution helps us make research more accessible and engaging for everyone! π
"The best way to predict the future is to create it." - Let's build the future of research communication together!
ASK is a sophisticated offline-first research tool that automatically generates comprehensive question-answer pairs with stunning visual content. Built with a focus on research methodology, sustainability science, engineering systems, and multi-theme exploration, it creates Instagram story-sized images (1080x1920) perfect for social media sharing.
- π¬ Offline-First ure: GPU β CPU β API fallback system
- π± Instagram Story Optimized: All images generated at 1080x1920 pixels
- π€ Enhanced Simple Mode: Multi-theme support with connected, chained-like experience
- π¨ Photorealistic Images: Advanced AI image generation with text overlays
- π Comprehensive Logging: Detailed CSV tracking and volume management
- β‘ Lazy Model Loading: Smart model downloads only when needed
- π Multi-Image Support: Long answers automatically split across multiple images
- π§ Intelligent Content Generation: Multi-theme research exploration
- π― Sequential Knowledge Building: Questions and answers numbered systematically (ASK-01, ASK-02, etc.)
- AI-Generated Backgrounds: Every research question and answer comes with stunning, photorealistic imagery
- Theme-Specific Design: Each discipline gets custom elements tailored to the research field
- Professional Quality: 8K resolution, professional photography style, realistic materials and lighting
- Offline-First: Works completely offline with cached AI models - no internet required!
- Multi-Theme Research: Explores intersections between various fields and disciplines
- Sequential Knowledge Building: Questions and answers are numbered sequentially (ASK-01, ASK-02, etc.) for systematic learning
- Sentence-Case Answers: All content is professionally formatted for readability
- Research Focus: Every piece of content is specifically tailored to research and practice
- GPU-Primary ure: Optimized for NVIDIA GPUs with CPU fallback
- Stable Diffusion 2.1: Latest AI models for photorealistic image generation
- Offline Operation: Complete independence from internet connectivity
- Smart Fallback System: GPU β CPU β API (if enabled) β Placeholder
- Python 3.8+
- 8GB RAM minimum (16GB recommended)
- 2GB free storage for models
- NVIDIA GPU with CUDA (optional, for accelerated generation)
- Clone the repository
git clone https://github.com/kushalsamant/ask.git
cd ask
- Install dependencies
pip install -r requirements.txt
- Configure environment
cp ask.env.template ask.env
# Edit ask.env with your settings
- Run the tool
python main.py
- Model Download: First run downloads AI models (~10GB)
- Offline Operation: Subsequent runs work completely offline
- Content Generation: Automatic generation of research content
- Visual Output: High-quality images in
images/
folder
python main.py
Generates Q&A pairs with multi-theme support and connected, chained-like experience.
python main.py -help
Shows all available modes and options.
Primary: GPU Generation (offline)
β
Fallback: CPU Generation (offline)
β
Last Resort: API Generation (online)
Component | Purpose | Status |
---|---|---|
main.py |
Main pipeline orchestrator | β Active |
smart_image_generator.py |
Smart fallback image generation | β Active |
offline_question_generator.py |
Template-based question generation | β Active |
offline_answer_generator.py |
Template-based answer generation | β Active |
image_add_text.py |
Text overlay and multi-image support | β Active |
volume_manager.py |
Image numbering and volume tracking | β Active |
Key configuration options in ask.env
:
# Image Generation
IMAGE_WIDTH=1080 # Instagram story width
IMAGE_HEIGHT=1920 # Instagram story height
IMAGE_QUALITY=95 # Image quality (1-100)
# AI Models
GPU_MODEL_ID=stabilityai/stable-diffusion-2-1
CPU_MODEL_ID=stabilityai/stable-diffusion-2-1-base
# Generation Modes
GPU_IMAGE_GENERATION_ENABLED=true
CPU_IMAGE_GENERATION_ENABLED=true
API_IMAGE_GENERATION_ENABLED=false
# Text Processing
MAX_CHARS_PER_LINE=50 # Characters per line
MULTI_IMAGE_THRESHOLD=800 # Trigger multi-image mode
# Multi-Theme Support
SIMPLE_MODE_THEMES=ure,marketing,cricket
The tool supports multiple research themes:
- sustainability_science: Environmental and sustainability research
- engineering_systems: Systems engineering and design
- technology_innovation: Technology and innovation studies
- urban_planning: Urban development and planning
- research_methodology: Research methods and approaches
- ure: ural design and theory
- marketing: Marketing strategies and research
- cricket: Sports research and analysis
Each run creates:
- Question Image:
ASK-XXX-theme-q.jpg
(1080x1920) - Answer Image:
ASK-XXX-theme-a.jpg
(1080x1920) - Multi-Image Answers:
ASK-XXX-theme-a-1.jpg
,ASK-XXX-theme-a-2.jpg
, etc.
ask/
βββ images/ # Generated images
β βββ ASK-001-*.jpg # Question images (odd numbers)
β βββ ASK-002-*.jpg # Answer images (even numbers)
β βββ compilations/ # Volume compilations
βββ logs/ # Execution logs
βββ models/ # Downloaded AI models
βββ log.csv # Q&A tracking database
βββ ask.env # Configuration file
The system maintains detailed logs in log.csv
:
Column | Description |
---|---|
id |
Sequential identifier |
theme |
Research theme |
question |
Generated question |
answer |
Generated answer |
question_image |
Question image filename |
answer_image |
Answer image filename |
is_question |
Boolean flag |
timestamp |
Creation timestamp |
Long answers are automatically split across multiple images:
- Threshold: 800+ characters triggers multi-image mode
- Chunk Size: 1000 characters per image
- Naming:
ASK-XXX-theme-a-1.jpg
,ASK-XXX-theme-a-2.jpg
- Automatic numbering: Sequential image numbers (odd for questions, even for answers)
- Volume tracking: Organizes content into manageable volumes
- Duplicate prevention: Prevents duplicate question generation
- GPU Generation: High-quality, fast generation (primary)
- CPU Generation: Reliable fallback (secondary)
- API Generation: Last resort with internet (tertiary)
- Research Inspiration: Daily research questions and insights
- Visual Presentations: High-quality photorealistic backgrounds for presentations
- Knowledge Building: Systematic exploration of research concepts
- Offline Work: Complete functionality without internet dependency
- Learning Tool: Structured research content
- Visual Learning: Photorealistic imagery for better understanding
- Research Projects: Ready-to-use research content
- Educational Presentations: Professional-quality visual assets
- Multi-Theme Exploration: Intelligent exploration across multiple research themes
- Content Generation: Automated research question and answer creation
- Visual Documentation: Professional imagery for research
- Knowledge Management: Systematic organization of research content
- Research Content: Daily research content for various fields
- Visual Assets: High-quality backgrounds for any discipline
- Professional Branding: Consistent ASK branding and numbering
- Offline Production: Create content without internet dependency
ask/
βββ main.py # Main pipeline
βββ requirements.txt # Python dependencies
βββ ask.env.template # Configuration template
βββ ask.env # Active configuration
βββ *.py # Core modules
βββ images/ # Generated content
βββ logs/ # Execution logs
βββ models/ # AI models cache
βββ README.md # This file
main.py
: Pipeline orchestrator with multiple modessmart_image_generator.py
: Intelligent image generation with fallbacksoffline_question_generator.py
: Template-based question generationoffline_answer_generator.py
: Template-based answer generationimage_add_text.py
: Text overlay and multi-image supportvolume_manager.py
: Image numbering and volume managementresearch_csv_manager.py
: CSV logging and data management
Core dependencies include:
- PyTorch: Deep learning framework
- Diffusers: Hugging Face image generation
- Pillow: Image processing
- Transformers: AI model loading
- Accelerate: Performance optimization
Component | Minimum | Recommended |
---|---|---|
CPU | Multi-core | 8+ cores |
RAM | 8GB | 16GB+ |
GPU | None | NVIDIA with CUDA |
Storage | 2GB | 5GB+ |
Mode | GPU | CPU | API |
---|---|---|---|
Simple | ~30s | ~2min | ~10s |
Enhanced | ~45s | ~3min | ~15s |
Multi-Image | ~60s | ~4min | ~20s |
1. Import Errors
pip install -r requirements.txt -upgrade
2. GPU Not Detected
# Check CUDA installation
nvidia-smi
# Install PyTorch with CUDA
pip install torch torchvision torchaudio -index-url https://download.pytorch.org/whl/cu118
3. Model Download Issues
# Clear cache and retry
rm -rf models/
python main.py
4. Memory Issues
# Reduce batch size in ask.env
BATCH_SIZE=1
logs/execution.log
: Detailed execution logslog.csv
: Q&A content database
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
git clone https://github.com/kushalsamant/ask.git
cd ask
pip install -r requirements.txt
cp ask.env.template ask.env
# Edit ask.env for your environment
python main.py -help
This project is licensed under the MIT License - see the LICENSE file for details.
- Hugging Face: For the diffusers and transformers libraries
- Stability AI: For the Stable Diffusion models
- PyTorch Team: For the deep learning framework
- Research Community: For inspiration and feedback
-
Issues: GitHub Issues
-
Discussions: GitHub Discussions
-
Documentation: Wiki
Made with β€οΈ for the research community
Generate, explore, and share knowledge with ASK: Daily Research
Date: 2025-08-24
Analysis: Current system ure vs. intended offline-first, GPU-primary design
- β CORRECT: GPU β CPU β API β Placeholder fallback order
- β CORRECT: GPU is tried FIRST when enabled
- β FIXED: Environment variables now default to "true" for both GPU and CPU
- β FIXED: Clear indication that GPU is PRIMARY mode
- β CORRECT: ask.env.template has both GPU and CPU enabled by default
- β CORRECT: ask.env has both GPU and CPU enabled
- β FIXED: smart_image_generator.py now defaults to "true" instead of "false"
- β CORRECT: GPU detection with CUDA availability check
- β CORRECT: Automatic fallback to CPU when GPU unavailable
- β CORRECT: Proper CUDA version detection and PyTorch installation
- β FIXED: API key validation is now optional for offline operation
- β FIXED: Clear indication of offline-first operation
- β FIXED: API key validation only happens when API generation is enabled
- β CORRECT: README.md accurately reflects offline-first approach
- β CORRECT: Hardware requirements show GPU as primary
- β CORRECT: Generation methods show proper hierarchy
- GPU Generation (Primary Mode) - Offline
- CPU Generation (First Fallback) - Offline
- API Generation (Last Resort) - Requires Internet
- Placeholder Images (Emergency) - Offline
- GPU_IMAGE_GENERATION_ENABLED=true β (default)
- CPU_IMAGE_GENERATION_ENABLED=true β (default)
- API_IMAGE_GENERATION_ENABLED=false β (default)
- Changed GPU_IMAGE_GENERATION_ENABLED default from "false" to "true"
- Changed CPU_IMAGE_GENERATION_ENABLED default from "false" to "true"
- Now defaults to offline-first operation
- Made API key validation optional for offline operation
- Added API_IMAGE_GENERATION_ENABLED environment variable check
- Only requires API key if API generation is explicitly enabled
- Added clear messaging for offline mode
- Added API_IMAGE_GENERATION_ENABLED=false to ask.env.template
- Added API_IMAGE_GENERATION_ENABLED=false to ask.env
- Updated comments to reflect offline-first approach
- Updated smart_image_generator.py docstring to emphasize offline-first
- Updated main.py docstring to emphasize offline-first
- Added clear comments for each generation method:
- GPU: "Primary Mode - Offline"
- CPU: "First Fallback - Offline"
- API: "Last Resort - Requires Internet"
- Placeholder: "Emergency Fallback - Offline"
- Standardized on "primary/fallback" terminology
- Consistent messaging across all files
- Clear hierarchy: Primary β First Fallback β Last Resort β Emergency
- GPU and CPU generation enabled by default
- API generation disabled by default
- No API key required for offline operation
- Clear fallback hierarchy maintained
- GPU Generation (Primary Mode) - Offline, fastest, highest quality
- CPU Generation (First Fallback) - Offline, slower but reliable
- API Generation (Last Resort) - Requires internet, only when enabled
- Placeholder Images (Emergency) - Offline, always available
- GPU_IMAGE_GENERATION_ENABLED=true (default)
- CPU_IMAGE_GENERATION_ENABLED=true (default)
- API_IMAGE_GENERATION_ENABLED=false (default)
- Users can run the tool completely offline
- No API key required for basic operation
- Clear messaging about offline mode
- Graceful fallback when hardware unavailable
The system now properly implements offline-first ure:
- β Defaults to offline operation
- β GPU is primary mode
- β CPU is first fallback
- β API is last resort (optional)
- β No API key required for offline use
- β Clear documentation and messaging
- β Consistent terminology throughout
The ASK research tool is now truly offline-first, with GPU as the primary mode of operation, CPU as the first fallback, and API generation as an optional last resort. Users can run the tool completely offline without requiring an API key, while still having the option to enable API generation if needed.