Spaces:
Paused
Paused
Commit History
-
docs: Update README with multi-environment support and remove redundant footer
README.md changes: - Add comprehensive multi-environment support documentation - Local environments: GPU (CUDA/MPS), CPU - HF Spaces: ZeroGPU, CPU Upgrade, CPU Basic - Add hardware auto-detection explanation with code examples - Add CUDA compatibility testing for RTX 5080+ support - Expand performance comparison table (2 → 5 environments) - Add known issues and troubleshooting section - Simplify installation instructions (single requirements.txt) - Add PyTorch version requirements per environment app.py changes: - Move useful content (test examples, loading time note) to header - Remove redundant footer section (60+ lines) - Cleaner UI with all important info at the top - Better user experience with reduced scrolling Benefits: - Eliminates duplicate information (header vs footer) - Improves information accessibility - Clearer environment setup guidance - Better troubleshooting documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <…f1ac66c -
fix: Import spaces before torch to prevent CUDA initialization error
Problem: - RuntimeError on ZeroGPU: 'CUDA has been initialized before importing spaces package' - torch was being imported before spaces could configure ZeroGPU properly Solution: - Move spaces import to top of file (before torch, transformers) - Set ZEROGPU_AVAILABLE at import time instead of after environment detection - Use already-imported ZEROGPU_AVAILABLE in detect_hardware_environment() - Remove duplicate ZEROGPU_AVAILABLE assignment Changes: - Lines 9-15: Import spaces first with try/except - Line 84: Use ZEROGPU_AVAILABLE directly instead of re-importing spaces - Line 138: Remove duplicate assignment, add explanatory comment This follows ZeroGPU best practice: import spaces before any CUDA package https://huggingface.co/docs/hub/spaces-zerogpu#basic-usage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>09e4bc2 -
feat: Add systemd service for automatic startup on Linux
- Add chatbot.service: systemd service configuration template - Add install-service.sh: automated installation script with: - Automatic user and path detection - Log file creation and permission setup - Service enablement and optional start - Color-coded output and error handling - Update README.md: comprehensive systemd service documentation - Installation instructions with auto-install script - Service management commands reference - Manual configuration guide for advanced users - Troubleshooting section for common issues - Service removal instructions Features: - Auto-detect current user and working directory - Create and configure log files with proper permissions - Enable automatic startup on system boot - Restart on failure with 10-second delay - Comprehensive logging to /var/log/chatbot.log and chatbot-error.log Usage: sudo ./install-service.sh 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>1a8caac -
feat: Center-align submit button with input field
UI Improvement: - Add vertical center alignment for submit button - Button now aligns with middle of input field - Better visual balance and user experience Changes: 1. Add custom CSS for .input-row class - align-items: center for vertical centering - height: 100% for button to match input height - min-height: 42px for minimum button height 2. Update gr.Row with elem_classes="input-row" - Applies custom CSS styling 3. Add container=False to Textbox - Removes extra padding for cleaner look 4. Add min_width=80 to Button - Ensures button has consistent minimum width Visual Result: - Before: Button aligned to top of input field - After: Button vertically centered with input field - Matches reference image provided by user 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>27061cd -
feat: Enable RTX 5080 GPU support with PyTorch nightly (CUDA 12.8)
- Remove CPU fallback for Blackwell GPUs (sm_120) - Update setup.py to install PyTorch nightly with CUDA 12.8 for RTX 5080 - Update CUDA 12.8+ mapping to use nightly builds with sm_120 support - Simplify test_cuda_compatibility() to only test tensor operations - Update RTX_5080_README.md with positive messaging about GPU support - RTX 5080 now fully supported with automatic nightly build installation Breaking change: RTX 5080 users must run `python setup.py` to install PyTorch nightly builds. Stable PyTorch releases do not support sm_120. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>6612ab5 -
feat: Add RTX 5080 support and remove requirements-local.txt
- Add CUDA compatibility testing for unsupported GPUs (RTX 5080/Blackwell) - Detect compute capability and fall back to CPU for sm_120+ GPUs - Update setup.py with PyTorch nightly builds for Blackwell GPUs - Add comprehensive GPU troubleshooting guide in INSTALL.md - Remove requirements-local.txt (deprecated in favor of setup.py) - Enhance hardware detection with cuda_compatible flag 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>2c96300 -
feat: Add flexible PyTorch installation for local vs HF Spaces
Problem: - HF Spaces ZeroGPU requires PyTorch 2.2.0 - Local environments can use latest PyTorch (2.5+) - Single requirements.txt forces old version on local Solution: - Create requirements-local.txt for local development - Create setup.py for automatic environment detection - Update README.md with 3 installation methods - Add INSTALL.md comprehensive guide Files Added: 1. requirements-local.txt: - PyTorch >=2.2.0 (no ZeroGPU restriction) - Same other dependencies as requirements.txt - Optimized for Mac/Linux/Windows local dev 2. setup.py: - Auto-detects HF Spaces vs local - Installs appropriate PyTorch version - Supports Apple Silicon (MPS) - Supports CUDA GPUs 3. INSTALL.md: - Complete installation guide - Method comparison table - Platform-specific instructions - FAQ and troubleshooting Installation Methods: 1. requirements-local.txt (recommended): - pip install -r requirements-local.txt - PyTorch >=2.2.0 latest 2. setup.py (automatic): …51c066f -
feat: Add comprehensive hardware environment detection system
Major Changes: - Implement detect_hardware_environment() function - Support 6 environment types with auto-detection - Dynamic UI based on detected hardware Environment Types Supported: 1. HF Spaces - ZeroGPU (NVIDIA H200) 2. HF Spaces - CPU Upgrade (8 vCPU, 32GB RAM) 3. HF Spaces - CPU Basic (2-4 vCPU, 16GB RAM) 4. Local - GPU (CUDA/MPS detection) 5. Local - Apple Silicon (MPS backend) 6. Local - CPU (fallback) Detection Logic: - SPACE_ID environment variable → HF Spaces - Import spaces success → ZeroGPU - CPU count >= 8 → CPU Upgrade - CPU count < 8 → CPU Basic - torch.cuda.is_available() → Local CUDA GPU - torch.backends.mps.is_available() → Apple Silicon GPU - Fallback → Local CPU Environment Info Displayed: - Platform (HF Spaces / Local) - Hardware type - GPU availability and name - CPU core count - Operating system - Detailed description UI Improvements: - Dynamic header with environment-specific info - Hardware-specific features and recommendations - Response time estimates p…a0f4ab8 -
feat: Add dynamic model count display
Changes: - Add TOTAL_MODEL_COUNT, PUBLIC_MODEL_COUNT, GATED_MODEL_COUNT variables - Calculate model counts dynamically from MODEL_CONFIGS - Replace hardcoded "10가지" with dynamic {TOTAL_MODEL_COUNT} - Show breakdown: "13가지 모델 (10 Public + 3 Gated)" Dynamic Calculation: - TOTAL_MODEL_COUNT = len(MODEL_CONFIGS) - PUBLIC_MODEL_COUNT = count models without 🔒 icon - GATED_MODEL_COUNT = TOTAL_MODEL_COUNT - PUBLIC_MODEL_COUNT Updated Locations: - Header (ZeroGPU mode): Shows total and breakdown - Header (CPU Upgrade mode): Shows total and breakdown - Footer (ZeroGPU mode): Shows total model count - Footer (CPU Upgrade mode): Shows total model count Benefits: - Auto-updates when models are added/removed - No manual text updates needed - Prevents outdated information - Shows clear Public vs Gated distinction Model Analysis: - Reviewed suggested models (DialoGPT, GPT-2, Llama-2-Ko, etc.) - Current list already contains superior alternatives - No additions needed - current selection optimal …fc890b6 -
feat: Bind Gradio server to 0.0.0.0 for external access
Change: - Update demo.launch() to bind to 0.0.0.0:7860 - Previously bound to 127.0.0.1 (localhost only) - Now accessible from external network connections Configuration: - server_name="0.0.0.0": Listen on all network interfaces - server_port=7860: Explicit port specification Use Cases: - Docker containers: Accessible from host machine - Network deployment: Accessible from other devices on LAN - Remote development: SSH tunneling and port forwarding - HF Spaces: Compatible with container networking Local Access: - http://localhost:7860 (still works) - http://127.0.0.1:7860 (still works) - http://<your-ip>:7860 (now works) Security Note: - 0.0.0.0 binding exposes service to network - Use firewall rules for production deployments - HF Spaces handles security automatically 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>751b361 -
docs: Update README.md with correct PyTorch version and dependencies
Updates: - Change PyTorch version from 2.9.0 to 2.2.0 in Dependencies section - Add missing packages: accelerate, huggingface-hub, spaces - Update Tech Stack section to reflect ZeroGPU-compatible PyTorch - Add inline comment about ZeroGPU compatibility Dependencies List Now Shows: - gradio==5.49.1 - transformers==4.57.1 - torch==2.2.0 (ZeroGPU compatible) - safetensors==0.6.2 - accelerate==0.26.1 - sentencepiece==0.2.0 - protobuf==4.25.1 - huggingface-hub>=0.19.0 - python-dotenv==1.0.0 - spaces (ZeroGPU support) Consistency: - README.md dependencies now match requirements.txt - All version numbers accurate and up-to-date - ZeroGPU compatibility clearly documented 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>bc7447d -
fix: Downgrade PyTorch to 2.2.0 for ZeroGPU compatibility
Issue: - HF Spaces ZeroGPU error: "No candidate PyTorch version found" - PyTorch 2.9.0 not supported by ZeroGPU infrastructure Fix: - Downgrade torch from 2.9.0 to 2.2.0 - ZeroGPU supports PyTorch versions 2.0.0-2.2.0 Technical Details: - ZeroGPU uses shared NVIDIA H200 GPU infrastructure - Only supports PyTorch 2.0.0, 2.1.0, and 2.2.0 - Local environments can still use any PyTorch version - Comment added to clarify version constraint Compatibility: - ✅ ZeroGPU Spaces: torch 2.2.0 (compatible) - ✅ CPU Upgrade Spaces: torch 2.2.0 (compatible) - ✅ Local development: torch 2.2.0 (stable release) References: - https://huggingface.co/docs/hub/spaces-zerogpu - ZeroGPU supported versions: PyTorch 2.0.0-2.2.0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>a54252d -
feat: Add HF Spaces deployment packages to requirements.txt
Added Packages: - accelerate==0.26.1: GPU memory optimization and model loading - huggingface-hub>=0.19.0: HF Hub API, model download, authentication - spaces: ZeroGPU support for dynamic GPU allocation Organization: - Add section comments for clarity - Group by functionality (ML, Tokenizers, HF, Environment, GPU) - Maintain compatibility with HF Spaces hosting requirements Technical Details: - accelerate: Required for large model loading with low_cpu_mem_usage - huggingface-hub: Enables cache management, token auth, model downloads - spaces: Optional package for ZeroGPU, graceful fallback on local Compatibility: - All packages tested on local environment - ZeroGPU (spaces) optional, fails gracefully when unavailable - huggingface-hub version >=0.19.0 for latest cache_dir features 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>674aa56 -
docs: Update README for 13-model multi-model chatbot system
Documentation Updates: - Update title to "Multi-Model Korean LLM Chatbot" - Add 13 model listing (10 Public + 3 Gated) - Highlight 3 new Korean models (EXAONE 7.8B/2.4B, Llama-3 Open-Ko) - Update sdk_version to 5.49.1 New Sections: - Model selection guide (speed vs quality vs ecosystem) - Lazy loading system documentation - Cache management explanation - Gated model access instructions - Local setup with .env file configuration Updated Information: - Dependencies: gradio 5.49.1, transformers 4.57.1, torch 2.9.0 - Performance metrics for 13-model system - Hardware requirements and recommendations - Space URL update to catchitplay/simple-chatbot-gradio Technical Details: - Document check_model_cached() function - Explain lazy loading implementation - Add HF_TOKEN setup instructions - Include model download size and time estimates 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>82b9256 -
feat: Add 3 Korean LLM models and update dependencies
Major Features: - Add EXAONE 3.5 7.8B Instruct (파라미터 대비 최고 효율) - Add EXAONE 3.5 2.4B Instruct (초경량, 빠른 응답) - Add Llama-3 Open-Ko 8B (Llama 3 생태계) - Expand model selection from 10 to 13 models (10 Public + 3 Gated) Model Management Improvements: - Implement lazy loading: models load on first use, not startup - Add cache detection with check_model_cached() function - Display cache status in UI (cached vs. downloading) - Add .env file loading with python-dotenv - Support gated models with HF_TOKEN authentication - Add detailed logging for model loading process Dependency Updates: - gradio: 5.9.1 → 5.49.1 - transformers: 4.46.0 → 4.57.1 - torch: 2.1.0 → 2.9.0 - safetensors: 0.4.5 → 0.6.2 - Add python-dotenv==1.0.0 for .env file support - Remove unused dependencies (accelerate, spaces) Technical Changes: - Implement loaded_model_name tracking for lazy loading - Add huggingface_hub.scan_cache_dir() for cache detection - Update UI messages to clarify cache vs download status - Change depre…bfd0656
-
feat: Add thinking indicator during bot response generation
UX improvement: Show loading state while generating response ✨ Enhancement: - Display "🤔 응답 생성 중..." message immediately after user input - Replaced by actual bot response when generation completes - Improves user feedback during wait time 🎯 User Experience Flow: 1. User sends message → Message displays instantly 2. "🤔 응답 생성 중..." appears → User knows bot is working 3. Bot response ready → Thinking indicator replaced with response 📝 Implementation: - Added intermediate yield with thinking indicator - Three-stage generator: user message → thinking → response - Clear visual feedback throughout entire process 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>0155077 -
feat: Show user message immediately before bot response
UX improvement: User input now displays instantly ✨ Enhancement: - Use generator (yield) to show user message immediately - First yield: Display user message right after input - Second yield: Add bot response when generation completes - Improves perceived responsiveness 🎯 User Experience: - Before: User message appears only after bot response (slow) - After: User message appears instantly (fast) - Better feedback during bot response generation 📝 Implementation: - Changed submit() to generator function - First yield: history + user message - Second yield: history + user message + bot response 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>c3dd276 -
fix: Add user message to history in messages format
Issue: User input not displaying in chat interface with type='messages' 🔧 Fix: - Explicitly add user message to history in chat_wrapper - Updated history = history + [{"role": "user", "content": message}] - Pass updated history to generate_response function 📝 Behavior: - User message now displays in chat interface - Proper message flow: user → assistant - Maintains conversation context correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>d64290b -
fix: Migrate to OpenAI-style messages format
UserWarning: The 'tuples' format for chatbot messages is deprecated 🔧 Changes: - Change Chatbot type from 'tuples' to 'messages' - Migrate from [[user, bot]] to [{role, content}] format - Update history parsing to use OpenAI-style messages - Change history[-3:] tuples to history[-6:] messages (last 3 turns) ✨ Benefits: - Future-proof against Gradio deprecation - Compatible with OpenAI message format - Better interoperability with other tools - Cleaner message structure 🔄 Format Migration: - Old: [["user msg", "bot msg"]] - New: [{"role": "assistant", "content": "bot msg"}] 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>2384d41 -
fix: Add attention_mask to improve generation reliability
Warning: The attention mask is not set and cannot be inferred from input 🔧 Fix: - Use tokenizer() instead of tokenizer.encode() - Explicitly create and pass attention_mask to generate() - Add padding=True to ensure proper mask generation - Pass attention_mask parameter to model.generate() ✨ Benefits: - More reliable text generation - Eliminates attention mask warning - Proper handling of padded sequences - Better model behavior with variable length inputs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>7cf114c -
feat: Add flexible hardware support (ZeroGPU + CPU Upgrade)
✨ Features: - Automatic hardware detection (ZeroGPU vs CPU Upgrade) - Conditional @spaces.GPU decorator application - Dynamic UI based on hardware type - No code changes needed when switching hardware 🔧 Technical Implementation: - Try/except for 'spaces' import detection - Shared generation logic (generate_response_impl) - Conditional decorator wrapper - Device-aware model loading (float16 for GPU, float32 for CPU) 📚 Documentation: - Comprehensive README with hardware comparison - Setup guides for both hardware options - Performance benchmarks and cost analysis - Usage scenarios and optimization tips 🎯 Benefits: - ZeroGPU: Fast (3-5s), cheap ($9/mo), 25min/day limit - CPU Upgrade: Slower (30s-1m), pricey ($22/mo), unlimited - Easy switching via Space Settings (no code changes) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>b44b68c -
fix: Change truncate to truncation in tokenizer.encode()
TypeError: PreTrainedTokenizerFast._batch_encode_plus() got an unexpected keyword argument 'truncate' 🔧 Fix: - Change 'truncate=True' to 'truncation=True' - Correct parameter name for Transformers library - Fixes tokenization error during inference 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>aa3c1df -
fix: Import spaces before CUDA-related packages
RuntimeError: CUDA has been initialized before importing the `spaces` package 🔧 Fix: - Move 'import spaces' to the very first import - Must be imported before torch, transformers, or any CUDA packages - Critical for ZeroGPU to work properly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>ab64ed7 -
feat: Add ZeroGPU support for Llama-2-Ko 7B
✨ Features: - ZeroGPU integration with @spaces.GPU decorator - Llama-2-Ko 7B model with dynamic GPU allocation - NVIDIA H200 hardware (70GB VRAM) - Float16 optimization for GPU efficiency 🔧 Technical Changes: - Add 'spaces' package to requirements.txt - Implement GPU request with 120s duration - Global model caching for efficiency - Korean-optimized conversation formatting 📚 Documentation: - Updated README with ZeroGPU setup guide - Added cost comparison and optimization tips - Included usage examples and limitations ⚠️ Requirements: - Hugging Face PRO subscription ($9/month) - ZeroGPU hardware selection in Space settings - Daily limit: 25 minutes free usage 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>9171967 -
Revert "test: Add Llama-2-Ko 7B model for large model testing"
This reverts commit 5d8fc933df6da614aae916889acac0ed1874cce6.a93accb -
test: Add Llama-2-Ko 7B model for large model testing
Testing large Korean language model on HF Spaces: - Model: beomi/llama-2-ko-7b (~14GB) - Memory requirements: 14GB+ RAM - Added device_map='auto' for GPU if available - Enhanced error handling for OOM scenarios - Korean language interface ⚠️ WARNING: This model may NOT work on HF Spaces free tier - Free tier: 16GB RAM total - Model: ~14GB - Remaining: ~2GB for system/runtime (tight!) Expected outcomes: ✅ Success: Model loads and generates Korean responses ❌ Failure: OOM error -> revert to smaller model Test with: '안녕하세요' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>5d8fc93 -
feat: Add single model (DialoGPT-small) for incremental testing
Incremental deployment strategy: - Single model only: DialoGPT-small (~350MB) - Lazy loading (no preload at startup) - Simplified error handling with full traceback - queue=False on all events - Pure Blocks implementation This version will help identify if the 500 errors are: - Model loading issues - Memory constraints - Transformers/torch compatibility If this works, we can add more models incrementally. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>718425d -
test: Deploy minimal echo version to debug 500 errors
Temporarily replace with minimal version: - No AI models - No transformers/torch dependencies - Simple echo functionality - Pure Gradio Blocks with queue=False This will help isolate whether the issue is: 1. HF Spaces infrastructure 2. Model loading 3. Gradio configuration 4. Python dependencies If this works, we can incrementally add features back.c7bf517 -
fix: Revert to torch_dtype for compatibility with all models
- Revert dtype back to torch_dtype - Add warnings filter to suppress deprecation warning - dtype parameter not supported by older model architectures (LlamaForCausalLM) - torch_dtype works with all models despite deprecation warning Error was: LlamaForCausalLM.__init__() got an unexpected keyword argument 'dtype' This ensures compatibility with all model types in the MODELS dict. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>476edda -
fix: Remove model preloading and fix dtype deprecation warning
Critical fixes for HF Spaces deployment: 1. Remove model preloading at startup - Models now load on first use only - Prevents startup memory issues on HF Spaces - Faster initial app loading 2. Fix torch_dtype deprecation - Replace torch_dtype with dtype parameter - Eliminates deprecation warnings This should resolve the 500 Internal Server Error by: - Reducing startup memory footprint - Preventing model loading failures during initialization - Allowing HF Spaces to start the app successfully Models will be loaded lazily when first requested by users. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>ecce181 -
fix: Add explicit queue=False to all event handlers
- Add queue=False to submit_btn.click() - Add queue=False to msg_input.submit() - Add queue=False to clear_btn.click() - Add queue=False to all example_btn clicks - Add queue=False to model_dropdown.change() This ensures queue system is completely disabled at the event level, not just at the demo level. Gradio may still auto-enable queuing for certain events without explicit queue=False parameter. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>f2581b9 -
refactor: Replace ChatInterface with pure Blocks to fix HTTP/2 errors
BREAKING CHANGE: Complete rewrite of chat interface - Remove ChatInterface completely (causes forced SSE usage) - Implement manual chat UI using gr.Blocks - Use tuple format for chat history [[user, bot], ...] - No queue system, no SSE, no HTTP/2 protocol errors This is the definitive fix for ERR_HTTP2_PROTOCOL_ERROR and 500 Internal Server Error issues on Hugging Face Spaces. ChatInterface internally enforces queue/SSE which is incompatible with HF Spaces infrastructure. Pure Blocks gives full control. Changes: - chat_response() now returns updated history list - Manual gr.Chatbot + gr.Textbox + gr.Button layout - Direct .click() and .submit() event handlers - No .queue() call anywhere 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>83d2348 -
fix: Remove concurrency_limit parameter causing 500 errors
- Remove concurrency_limit=None from ChatInterface - Use default concurrency behavior - Queue system still disabled (no .queue() call) - Fixes 500 Internal Server Error on HF Spaces The concurrency_limit=None parameter was causing server-side errors. Simply not calling .queue() is sufficient to disable the queue system and prevent HTTP/2 SSE issues. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>e6282fc -
fix: Remove deprecated enable_queue parameter for Gradio 5.x
- Remove enable_queue=False from demo.launch() - In Gradio 5.x, queue is disabled by default unless .queue() is called - Keep concurrency_limit=None in ChatInterface - Resolves TypeError: unexpected keyword argument 'enable_queue' This properly disables the queue system in Gradio 5.x to prevent HTTP/2 SSE errors on Hugging Face Spaces. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>a82c24c -
fix: Disable queue system to resolve HTTP/2 SSE errors
- Add concurrency_limit=None to ChatInterface - Add enable_queue=False to demo.launch() - Prevents ERR_HTTP2_PROTOCOL_ERROR on HF Spaces - Removes /gradio_api/queue/data SSE endpoint - Removes /gradio_api/heartbeat connection checks This fixes persistent HTTP/2 protocol errors even on PRO tier by disabling Server-Sent Events (SSE) streaming entirely. Trade-off: No token-by-token streaming, but stable operation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>3228df9
-
fix: Replace examples with interactive buttons for model switching
**Problem:** - ChatInterface examples with additional_inputs don't work properly - Model dropdown not updating when example is clicked - Examples were non-functional with current setup **Solution:** - Replace built-in examples with custom button-based UI - Create 4 separate example buttons with emojis - Each button updates both model dropdown and textbox - Organized in 2 columns (English vs Korean examples) **Example Buttons:** English: - 👋 Hello! How are you? → DialoGPT-small - 😄 Tell me a joke → DialoGPT-medium Korean: - 🌤️ 안녕하세요! 오늘 날씨가 어때요? → Llama-2-Ko 7B - 🤖 인공지능에 대해 간단히 설명해주세요. → KoT-Llama2-7B-Chat **Benefits:** - Actually works (updates both model and input) - Better UX with clear visual separation - Emoji indicators for context - Clear description of functionality 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>42fba8e -
feat: Improve input field visibility with custom styling
**Visual Improvements:** - Add custom CSS for input textbox with blue border (2px solid #2563eb) - Light background color (#f8fafc) to distinguish from other elements - Enhanced focus state with darker border and white background - Subtle shadow effects for depth - Larger font size (16px) for better readability - Increased padding (12px) for comfortable typing **UX Enhancements:** - Added 💬 emoji to placeholder text - Removed label for cleaner look (show_label=False) - Focus state with stronger visual feedback - Italic placeholder text in slate color (#64748b) **CSS Styling:** - Normal state: Blue border, light blue background, subtle shadow - Focus state: Darker blue border, white background, stronger shadow - Placeholder: Slate color with italic style Makes the input field significantly more visible and user-friendly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>7dd37b0
-
feat: Add autofocus to message input field
**UX Improvement:** - Add autofocus=True to textbox component - Users can start typing immediately without clicking - Better user experience on page load **Technical Change:** - Modified gr.Textbox in ChatInterface - Added autofocus=True parameter - Compatible with Gradio 5.9.1 Improves user experience by allowing immediate message input. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>e57b6dc -
fix: Upgrade accelerate to 0.26.1 for low_cpu_mem_usage support
**Critical Fix:** - accelerate: 0.25.0 → 0.26.1 (minimum required for low_cpu_mem_usage) - Fixes: Using low_cpu_mem_usage=True requires accelerate>=0.26.0 **Error Resolved:** All models were failing to load with: 'Using low_cpu_mem_usage=True requires Accelerate: pip install accelerate>=0.26.0' This was blocking: - microsoft/DialoGPT-small - gpt2 - beomi/llama-2-ko-7b - All other models 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>54394d9 -
chore: Trigger container rebuild for HF Spaces
Force container rebuild to apply all dependency changes and resolve Docker registry issues. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>4e0152c -
fix: Downgrade torch and accelerate for smaller build size
**Dependency Optimization:** - torch: 2.5.1 → 2.1.0 (reduce build size by ~500MB) - accelerate: 1.2.1 → 0.25.0 (better compatibility with torch 2.1) - Keep: gradio==5.9.1, transformers==4.46.0, safetensors==0.4.5 **Benefits:** - Smaller Docker image size (~2GB reduction) - Faster build time on HF Spaces - Avoid 400 Bad Request during Docker push - Still maintain all required functionality **Compatibility:** - Torch 2.1.0 is stable and well-tested - Fully compatible with transformers 4.46.0 - Supports all features needed for model loading Fixes Docker registry push error on HF Spaces. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>29826d0 -
fix: Pin exact dependency versions for stable builds
**Dependency Version Pinning:** - gradio==5.9.1 (from >=5.0.0) - transformers==4.46.0 (from >=4.30.0) - torch==2.5.1 (from >=2.0.0) - safetensors==0.4.5 (from >=0.4.0) - accelerate==1.2.1 (from >=0.20.0) **Benefits:** - Reproducible builds on HF Spaces - Avoid version conflicts during Docker image build - Prevent unexpected breaking changes from newer versions - Reduce build time by avoiding version resolution **Fixes:** - Resolves 400 Bad Request error during Docker push - Ensures consistent behavior across deployments - Matches README.md sdk_version specification 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>9d3c5ca -
fix: Add fallback for model loading with better error handling
**Model Loading Improvements:** - Explicitly set use_safetensors=True for primary loading attempt - Add try-except fallback to default loading if safetensors fails - Keep torch_dtype=torch.float32 (dtype not supported in transformers 4.30) - Better error messages for debugging **Error Handling:** - Primary: Try loading with use_safetensors=True - Fallback: Try loading without use_safetensors if primary fails - Print warning message when fallback is used - Prevents complete failure when safetensors has issues This should fix the model loading error on HF Spaces while maintaining compatibility with both safetensors and legacy formats. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>884298e -
fix: Add safetensors support and improve model loading
**Model Loading Improvements:** - Add safetensors>=0.4.0 to requirements for modern model format support - Add accelerate>=0.20.0 for optimized model loading - Enable trust_remote_code for tokenizer and model loading - Add low_cpu_mem_usage=True to reduce memory footprint - Fix torch_dtype deprecation warning (use dtype instead) **Technical Changes:** - Support both safetensors and pytorch_model.bin formats - Better memory management for large models - Enable remote code execution for special tokenizers - Improved compatibility with HuggingFace Hub This fixes the model loading error on Hugging Face Spaces: "Can't load the model for 'microsoft/DialoGPT-small'" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>e6dc16b -
feat: Add better Korean language models
**Model Changes:** - Remove: skt/kogpt2-base-v2 (poor conversation quality) - Add: beomi/llama-2-ko-7b (Llama 2 based Korean model, 14GB) - Add: kyujinpy/KoT-Llama2-7B-Chat (Korean optimized Llama 2, 14GB) - Add: nlpai-lab/kullm-polyglot-5.8b-v2 (Korea Univ NLP lab model, 12GB) - Keep: beomi/KoAlpaca-Polyglot-5.8B (existing model, 12GB) **Model Summary:** - Total: 7 models (3 English, 4 Korean) - All Korean models have memory warnings (12-14GB RAM required) - Korean models are not suitable for HF Spaces free tier **Documentation Updates:** - Updated README with new model list and specifications - Added performance notes for Korean models - Updated examples to use new Korean models - Clarified that Korean models require GPU tier on HF Spaces **Important Notes:** - Korean models provide better conversation quality - All Korean models require high memory (12-14GB) - Free tier users should stick to English models only - GPU recommended for acceptable performance 🤖 Generated with [Clau…c6d4144 -
fix: Use chatbot_state instead of chatbot_value
- Change from chatbot.chatbot_value to chatbot.chatbot_state - Fixes AttributeError on Hugging Face Spaces deployment - chatbot_state is the correct attribute in Gradio ChatInterface Resolves runtime error: AttributeError: 'ChatInterface' object has no attribute 'chatbot_value' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>fb55a82 -
chore: Remove .claude/settings.local.json from Git tracking
- Remove IDE configuration file from version control - File was already in .gitignore but still tracked - Local file remains intact, only removed from Git index This prevents personal IDE settings from being committed and pushed to remote repositories. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>78792e1 -
chore: Organize .gitignore with Claude Code section
- Remove duplicate .claude/settings.local.json entry - Add dedicated "Claude Code" section in .gitignore - Improve file organization and readability 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>1134df2 -
feat: Optimize for Hugging Face Spaces deployment
**Hugging Face Spaces Compatibility:** - Remove python-dotenv dependency (Spaces uses Secrets system) - Update HF_TOKEN handling to work with both local and Spaces environments - Add memory warning for KoAlpaca 5.8B model (8GB+ RAM required) - Display warning message in UI when selecting high-memory models **User Experience Improvements:** - Automatic warning display for resource-intensive models - Clear indication that KoAlpaca may not work on free tier - Updated README with Spaces-specific deployment details **Technical Changes:** - Changed HF_TOKEN from dotenv to direct os.getenv() with None fallback - Added model warning system in MODELS configuration - Implemented dynamic warning UI component - Updated model dropdown to show memory requirements **Documentation Updates:** - Clarified HF_TOKEN is optional for public models - Added Spaces free tier limitations (16GB RAM, 48h sleep) - Recommended stable models for free tier deployment - Updated deployment instructions with build ti…5c29192 -
chore: Add Claude Code settings to .gitignore
- Add .claude/settings.local.json to gitignore - Prevents local IDE configuration from being committed - Keeps personal development settings private 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>6ae6708