File size: 1,180 Bytes
ddf6c8e
 
 
 
 
 
 
 
 
 
 
 
6fd1405
ddf6c8e
6fd1405
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
title: Code Gen Bot
emoji: 📊
colorFrom: indigo
colorTo: blue
sdk: streamlit
sdk_version: 1.42.2
app_file: app.py
pinned: false
license: mit
short_description: code gen bot
---
Check out the configuration reference at [https://huggingface.co/docs/hub/spaces-config-reference](https://huggingface.co/docs/hub/spaces-config-reference)

# Code Generation Bot

This is a simple bot that generates Python code from natural language descriptions using the CodeGen-350M-mono model from Hugging Face.

## How to Use
1. Enter a description of the code you want (e.g., "Write a function to calculate factorial").
2. Click "Generate Code" to see the output.
3. Review the generated code for correctness before copying it.

## Tips
- Be specific in your descriptions for better results (e.g., "Write a Python function to add two numbers and return the sum").
- The generated code may need minor tweaks, as it’s AI-generated.

## About
- **Model:** Salesforce/codegen-350M-mono
- **Framework:** Streamlit
- **Deployment:** Hosted on Hugging Face Spaces

## Example
- **Input:** "Write a function to add two numbers"
- **Output:**
  ```python
  def add_numbers(a, b):
      return a + b