Skip to content

Ahmed-Alawlaqi/codeGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Code Snippet Generator

A web application that allows users to generate code snippets in various programming languages based on their description. Built using Python, the OpenAI API, and the Streamlit framework.

Features

  • Generate code snippets from natural language descriptions
  • Support for multiple programming languages
  • Simple and intuitive user interface
  • Fast response time using OpenAI's powerful models
  • Copy generated code to clipboard with one click

Technologies Used

  • Python 3.x
  • Streamlit (for web interface)
  • OpenAI API (for code generation)
  • Other dependencies (list any major ones)

Installation

1. Clone this repository:

git clone https://github.com/your-username/code-snippet-generator.git
cd codeGenerator

2. Create and activate a virtual environment (recommended):

3. Install Required Packages

Install Streamlit and the OpenAI Python library:

  pip install openai
  pip install streamlit

4. Install the required dependencies:

pip freeze > requirements.txt

5.Set up your OpenAI API key:

Create a .env file in the root directory Add your API key:

OPENAI_API_KEY=your-api-key-here

Usage

Run the Streamlit application on Localhost (Your Machine):

streamlit run app.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages