CoolFace
Apppublic

ishaAtif/python-code-reviewer

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
App README

๐Ÿ Python Code Reviewer

An AI-powered Python code review tool that analyses your code across four dimensions.

Python Streamlit Claude

โœจ Features

  • โ€”๐Ÿ› Bug Detection โ€” Finds bugs, edge cases and risky patterns with line numbers
  • โ€”โฑ๏ธ Complexity Analysis โ€” Time and space complexity with plain English explanation
  • โ€”๐Ÿ—๏ธ OOP Suggestions โ€” Design improvement recommendations
  • โ€”โœจ Auto Rewrite โ€” Clean, improved version of your code

๐Ÿš€ Live Demo

๐Ÿ‘‰ Try it on HuggingFace Spaces

๐Ÿ› ๏ธ Tech Stack

ToolPurpose
PythonCore language
StreamlitWeb interface
Claude API (Haiku)AI code review
python-dotenvEnvironment variable management

โš™๏ธ Run Locally

bash
# Clone the repo
git clone https://github.com/isha-atif-dev/python-code-reviewer.git
cd python-code-reviewer

# Install dependencies
pip install -r requirements.txt

# Add your Claude API key
echo "ANTHROPIC_API_KEY=your_key_here" > .env

# Run the app
streamlit run app.py

๐Ÿ“ Project Structure

python-code-reviewer/
โ”œโ”€โ”€ app.py            # Streamlit frontend
โ”œโ”€โ”€ reviewer.py       # Claude API logic
โ”œโ”€โ”€ prompts.py        # Prompt templates
โ”œโ”€โ”€ requirements.txt  # Dependencies
โ”œโ”€โ”€ Dockerfile        # HuggingFace deployment
โ””โ”€โ”€ .gitignore        # Ignores .env file

๐Ÿ”’ Note

Never commit your .env file. Your API key is protected via .gitignore.