Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available:
6.8.0
metadata
title: AutoDoc
emoji: 👀
colorFrom: red
colorTo: pink
sdk: gradio
sdk_version: 5.20.1
app_file: app.py
pinned: false
license: mit
short_description: Automatically add docstrings and comments to Python using AI
Automatic Python Documentation Generator
Automatically add high-quality docstrings and comments to Python code using Gemini or OpenAI. Follows PEP 257 conventions.
Features
- Add docstrings and comments to Python code.
- Supports Gemini and OpenAI APIs.
- Execute and test code directly in the app.
- Clean and user-friendly Gradio interface.
How to Use
- Enter your Python code in the Original Python Code box.
- Select your preferred API (Gemini or OpenAI).
- Click Add Documentation to generate docstrings and comments.
- Run the original or documented code to see the output.
Requirements
- Python 3.8+
- Libraries:
gradio,google-generativeai,openai,python-dotenv
Setup
Clone the repository:
git clone https://huggingface.co/spaces/ydvaidya23/AutoDocInstall dependencies:
pip install -r requirements.txtAdd your API keys to .env:
GEMINI_API_KEY=your-gemini-api-key
OPENAI_API_KEY=your-openai-api-key
6. Run the app:
```bash
python app.py
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference