AstonProject / src /README_HF_SPACES.md
FaroukTomori's picture
Upload 9 files
28868c1 verified

AI Programming Tutor - Hugging Face Spaces Deployment

πŸš€ Quick Start

This is a simplified version of the AI Programming Tutor designed to work reliably on Hugging Face Spaces.

Files for Deployment:

  • app.py - Super simple version (20 lines) - RECOMMENDED
  • streamlit_app.py - Full featured version (109 lines)
  • requirements.txt - Only Streamlit dependency
  • .streamlit/config.toml - Minimal configuration

Deployment Steps:

  1. Upload to Hugging Face Spaces

    • Create new Space
    • Choose "Streamlit" as SDK
    • Upload these files
  2. Use app.py for guaranteed success

    • Only 20 lines of code
    • No complex dependencies
    • Works immediately
  3. Alternative: Use streamlit_app.py

    • More features and better UI
    • Tabbed interface
    • Still minimal and reliable

Features:

  • βœ… Code Analysis: Enter Python code for feedback
  • βœ… Strengths & Weaknesses: Identify what's good and what needs improvement
  • βœ… Step-by-Step Improvements: Clear guidance on how to improve
  • βœ… Learning Points: Key concepts to understand
  • βœ… Comprehension Questions: Test your understanding
  • βœ… Code Fixes: See improved versions

Demo Mode:

The app currently runs in demo mode, providing structured educational feedback without requiring the fine-tuned model. This ensures it works immediately on Hugging Face Spaces.

Future Enhancement:

To add the fine-tuned model:

  1. Upload model to Hugging Face Model Hub
  2. Add HF_TOKEN to Spaces secrets
  3. Update the app to use the model

Status: βœ… Ready for deployment on Hugging Face Spaces