|
Download README.md from SyedTahir/STHASI-Generative-AI-Documentation-Generator: direct link, hf CLI and curl.
- Browser
- Download file 2.19 kB
-
https://huggingface.co/spaces/SyedTahir/STHASI-Generative-AI-Documentation-Generator/resolve/main/README.md
- Command line
-
hf download hf://spaces/SyedTahir/STHASI-Generative-AI-Documentation-Generator/README.md
-
curl -L -o README.md https://huggingface.co/spaces/SyedTahir/STHASI-Generative-AI-Documentation-Generator/resolve/main/README.md
2.19 kB
A newer version of the Gradio SDK is available: 6.32.0
metadata
title: STHASI Generative AI Documentation Generator
emoji: π
colorFrom: purple
colorTo: pink
sdk: gradio
sdk_version: 5.49.1
app_file: app.py
pinned: false
license: apache-2.0
π Generative AI Documentation Generator
This is a Hugging Face Space that automatically generates technical documentation for Python codebases using the power of Large Language Models.
β¨ Features
- Automated Documentation: Simply provide a public GitHub repository URL, and the app will generate clear, concise documentation for each function and class.
- Modern UI/UX: A clean, responsive interface built with Gradio, featuring a dark mode theme.
- Advanced - Ask Your Codebase: An interactive chatbot that lets you ask natural language questions about the repository's code.
- Powered by CodeLlama: Utilizes
codellama/CodeLlama-7b-Instruct-hffor high-quality, code-aware text generation.
π οΈ How It Works
- Clone Repository: The app clones the provided public GitHub repository into its temporary storage.
- Parse Code: It intelligently parses Python files using Abstract Syntax Trees (
ast) to identify functions and classes, which is more reliable than simple text matching. - Generate Docs: For each code element, it creates a detailed prompt and sends it to the CodeLlama model to generate a professional docstring, including purpose, parameters, return values, and usage examples.
- Chat with Code: The "Ask Your Codebase" feature combines the entire codebase into a single context, allowing the LLM to answer specific questions about the project's logic and structure.
π How to Use
- Open the Hugging Face Space.
- In the "Documentation Generator" tab, enter the URL of a public GitHub repository containing Python code.
- Click "Generate Docs" and wait for the process to complete. The status bar will show the current progress.
- Switch to the "Ask Your Codebase" tab, ensure the URL is entered, and ask any question about the code!
