--- 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