CoolFace
Apppublic

Kethana009/CODE-EXPLANATION

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
App README

AI Code Explainer ๐Ÿค–

A premium, interactive Gradio application that explains source code in detail using Hugging Face's Qwen2.5-Coder model (via Hugging Face Router API).

Features

  • โ€”Interactive Execution Player: Step through code execution line by line and see how program state and variables evolve.
  • โ€”Smart Syntax Highlighting & Language Selector: Supports auto-detection or manual selection for Python, Java, C, C++, JavaScript, Go, Rust, and HTML/CSS.
  • โ€”Detailed Explanation Tabs:
  • โ€”Overview & Beginner Summary: Brief high-level summary and friendly introduction.
  • โ€”Line-by-Line breakdown: Visual table mapping each code line to its detailed purpose.
  • โ€”Interactive execution trace: Stepper controls to visualize state changes.
  • โ€”Complexity & Output: Analysis of Big-O time/space complexity and predicted program output.
  • โ€”Download and Copy Options: Clean download buttons to save explanations as markdown, plus copy buttons.
  • โ€”Stunning Glassmorphism Design: High-fidelity dark mode with neon accents and modern typography.

Installation

Ensure you have Python 3.8+ installed. Then install the dependencies:

bash
pip install -r requirements.txt

Running the Application

Start the web application:

bash
python app.py

Open the printed URL (typically http://127.0.0.1:7860) in your web browser. Make sure to input your Hugging Face API Token (which you can generate for free in your HF account settings).