Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,14 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
-
title: CodeBlesser
|
| 3 |
-
emoji: π
|
| 4 |
-
colorFrom: gray
|
| 5 |
-
colorTo: pink
|
| 6 |
-
sdk: gradio
|
| 7 |
-
sdk_version: 5.42.0
|
| 8 |
-
app_file: app.py
|
| 9 |
-
pinned: false
|
| 10 |
-
license: mit
|
| 11 |
-
short_description: 'Blessed by prebuilt modal to rectify code and bugs.. '
|
| 12 |
-
---
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
# π AI Code Generator & Bug Fixer
|
| 2 |
+
|
| 3 |
+
A powerful AI-powered code assistant that can generate, fix, optimize, and explain code in multiple programming languages.
|
| 4 |
+
|
| 5 |
+
## π Features
|
| 6 |
+
|
| 7 |
+
- **π§ Generate Code**: Create clean, optimized code from natural language descriptions
|
| 8 |
+
- **π Fix Bugs**: Automatically identify and fix bugs in your code
|
| 9 |
+
- **β‘ Optimize Code**: Improve code performance and readability
|
| 10 |
+
- **π Explain Code**: Get detailed explanations of how code works
|
| 11 |
+
- **π― Multi-Language Support**: Python, JavaScript, Java, C++, C#, Go, Rust, TypeScript, PHP, Ruby, HTML, CSS, SQL
|
| 12 |
+
- **π¨ Modern UI**: Beautiful, responsive interface built with Gradio
|
| 13 |
+
- **βοΈ Customizable**: Adjustable parameters for creativity and output length
|
| 14 |
+
|
| 15 |
+
## π Quick Start
|
| 16 |
+
|
| 17 |
+
1. Click **"Initialize Model"** to load the AI engine
|
| 18 |
+
2. Select your **task type** (Generate, Fix, Optimize, or Explain)
|
| 19 |
+
3. Choose your **programming language**
|
| 20 |
+
4. Enter your request or paste your code
|
| 21 |
+
5. Click **"Process Request"** and get instant results!
|
| 22 |
+
|
| 23 |
+
## π‘ Example Use Cases
|
| 24 |
+
|
| 25 |
+
### Generate Code
|
| 26 |
+
```
|
| 27 |
+
Input: "Create a REST API endpoint for user authentication"
|
| 28 |
+
Output: Complete FastAPI/Flask code with authentication logic
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
### Fix Bugs
|
| 32 |
+
```python
|
| 33 |
+
# Input (buggy code):
|
| 34 |
+
def calculate_average(numbers):
|
| 35 |
+
total = 0
|
| 36 |
+
for i in range(len(numbers)):
|
| 37 |
+
total += numbers[i]
|
| 38 |
+
return total / len(numbers) # Division by zero possible!
|
| 39 |
+
|
| 40 |
+
# Output: Fixed version with error handling
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
### Optimize Code
|
| 44 |
+
```python
|
| 45 |
+
# Input: Inefficient bubble sort
|
| 46 |
+
# Output: Optimized quicksort or built-in sorting with explanations
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
### Explain Code
|
| 50 |
+
```python
|
| 51 |
+
# Input: Complex decorators or algorithms
|
| 52 |
+
# Output: Step-by-step explanation of functionality
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
## π οΈ Technical Details
|
| 56 |
+
|
| 57 |
+
- **Framework**: Gradio 4.0+
|
| 58 |
+
- **AI Models**: Multiple fallback models for reliability
|
| 59 |
+
- **Languages Supported**: 13+ programming languages
|
| 60 |
+
- **Deployment**: Optimized for Hugging Face Spaces
|
| 61 |
+
- **GPU Support**: Automatic GPU detection and utilization
|
| 62 |
+
|
| 63 |
+
## π Installation
|
| 64 |
+
|
| 65 |
+
For local development:
|
| 66 |
+
|
| 67 |
+
```bash
|
| 68 |
+
git clone https://github.com/hari7261/ai-code-assistant
|
| 69 |
+
cd ai-code-assistant
|
| 70 |
+
pip install -r requirements.txt
|
| 71 |
+
python app.py
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
## π§ Configuration
|
| 75 |
+
|
| 76 |
+
The app automatically handles:
|
| 77 |
+
- Model loading with fallback options
|
| 78 |
+
- GPU/CPU optimization
|
| 79 |
+
- Memory management
|
| 80 |
+
- Error handling
|
| 81 |
+
|
| 82 |
+
## π¨ UI Features
|
| 83 |
+
|
| 84 |
+
- **Modern Design**: Gradient backgrounds and smooth animations
|
| 85 |
+
- **Responsive Layout**: Works on desktop and mobile
|
| 86 |
+
- **Code Highlighting**: Syntax highlighting for all supported languages
|
| 87 |
+
- **Examples**: Pre-built examples for quick testing
|
| 88 |
+
- **Real-time Feedback**: Status updates and progress indicators
|
| 89 |
+
|
| 90 |
+
## π€ Contributing
|
| 91 |
+
|
| 92 |
+
Contributions are welcome! Please feel free to submit issues and pull requests.
|
| 93 |
+
|
| 94 |
+
## π License
|
| 95 |
+
|
| 96 |
+
This project is open source and available under the MIT License.
|
| 97 |
+
|
| 98 |
+
## πββοΈ Creator
|
| 99 |
+
|
| 100 |
+
**Hariom Kumar Pandit**
|
| 101 |
+
- π GitHub: [@hari7261](https://github.com/hari7261)
|
| 102 |
+
- π€ HuggingFace: [@hari7261](https://huggingface.co/hari7261)
|
| 103 |
+
|
| 104 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
|
| 106 |
+
**Made with β€οΈ for the developer community**
|
| 107 |
+
|
| 108 |
+
*Empowering developers worldwide with AI-powered coding assistance*
|