Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
5.27.1
metadata
title: Mynotebooksummary
emoji: 🔥
colorFrom: yellow
colorTo: indigo
sdk: gradio
sdk_version: 5.25.1
app_file: app.py
pinned: false
short_description: Summarize Jupyter notebooks
Notebook Enhancer Prototype
This tool uses Hugging Face models to automatically enhance Python Jupyter notebooks by adding:
- Descriptive titles before each code cell
- Detailed summaries explaining what the code does
Features
- Analyzes Python code in Jupyter notebooks using NLP models
- Generates concise titles for each code cell
- Creates explanatory summaries of the code's purpose and functionality
- User-friendly Gradio interface for easy upload and processing
- Works with standard
.ipynb
notebook files
Requirements
pip install transformers torch gradio nbformat
Usage
Run the application:
python notebook_enhancer.py
Access the Gradio interface in your browser (typically at http://127.0.0.1:7860)
Upload a Jupyter notebook file (.ipynb)
Click "Enhance Notebook" to process the file
Download the enhanced notebook
How It Works
The application uses one Hugging Face model:
- "sagard21/python-code-explainer" https://huggingface.co./sagard21/python-code-explainer
Limitations
- The Hugging Face models have a maximum input token limit, so very long code cells may be truncated
- The quality of summaries depends on the clarity and structure of the original code
- Processing large notebooks may take some time due to the NLP models
- This is a prototype solution; more tweaking is required