code-gen-bot / README.md
DilipKY's picture
Update README.md
6fd1405 verified

A newer version of the Streamlit SDK is available: 1.45.0

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

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:
    def add_numbers(a, b):
        return a + b