CoolFace
Apppublic

ImranAliNaeem/Pseudo-code-to-Code-Generation

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

๐Ÿš€ SPoC: Pseudocode to Code Converter

Transform natural language pseudocode into executable C++ code using AI! Powered by fine-tuned GPT-2 with LoRA.

Features

  • โ€”๐Ÿค– AI-Powered Conversion: Uses fine-tuned GPT-2 model with LoRA adapters
  • โ€”๐Ÿ’ป C++ Code Generation: Converts pseudocode to executable C++ code
  • โ€”โšก Real-time Generation: Fast code generation with customizable parameters
  • โ€”๐Ÿ“ฅ Download Support: Export generated code as .cpp or .txt files
  • โ€”๐ŸŽฏ Example Templates: Pre-built examples for common programming patterns

How to Use

  1. 1.Enter Pseudocode: Write clear, step-by-step pseudocode in the input box
  2. 2.Adjust Settings: Customize generation parameters (temperature, beam search, etc.)
  3. 3.Generate Code: Click the "Generate Code" button
  4. 4.Download: Save your generated C++ code

Supported Patterns

  • โ€”๐Ÿ“ฅ Input/Output operations
  • โ€”๐Ÿ”„ Loops (for/while)
  • โ€”โ“ Conditionals (if/else)
  • โ€”๐Ÿ“Š Arrays and data structures
  • โ€”๐Ÿ”ค String manipulation
  • โ€”๐Ÿงฎ Mathematical operations
  • โ€”๐Ÿ”ง Functions and procedures

Model Information

  • โ€”Base Model: GPT-2
  • โ€”Fine-tuning: LoRA (Low-Rank Adaptation)
  • โ€”Training Data: SPoC dataset
  • โ€”Trainable Parameters: ~811K
  • โ€”Task: Pseudocode to C++ code conversion

Tips for Best Results

  • โ€”โœ… Be specific and clear in your pseudocode
  • โ€”โœ… Use simple, descriptive variable names
  • โ€”โœ… Describe logic step-by-step
  • โ€”โœ… One operation per line
  • โ€”โœ… Use standard programming terminology

Examples

Input/Output