Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
@@ -10,4 +10,50 @@ pinned: false
|
|
10 |
short_description: Summarize Jupyter notebooks
|
11 |
---
|
12 |
|
13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
short_description: Summarize Jupyter notebooks
|
11 |
---
|
12 |
|
13 |
+
# Notebook Enhancer Prototype
|
14 |
+
|
15 |
+
This tool uses Hugging Face models to automatically enhance Python Jupyter notebooks by adding:
|
16 |
+
1. Descriptive titles before each code cell
|
17 |
+
2. Detailed summaries explaining what the code does
|
18 |
+
|
19 |
+
## Features
|
20 |
+
|
21 |
+
- Analyzes Python code in Jupyter notebooks using NLP models
|
22 |
+
- Generates concise titles for each code cell
|
23 |
+
- Creates explanatory summaries of the code's purpose and functionality
|
24 |
+
- User-friendly Gradio interface for easy upload and processing
|
25 |
+
- Works with standard `.ipynb` notebook files
|
26 |
+
|
27 |
+
## Requirements
|
28 |
+
|
29 |
+
```
|
30 |
+
pip install transformers torch gradio nbformat
|
31 |
+
```
|
32 |
+
|
33 |
+
## Usage
|
34 |
+
|
35 |
+
1. Run the application:
|
36 |
+
```
|
37 |
+
python notebook_enhancer.py
|
38 |
+
```
|
39 |
+
|
40 |
+
2. Access the Gradio interface in your browser (typically at http://127.0.0.1:7860)
|
41 |
+
|
42 |
+
3. Upload a Jupyter notebook file (.ipynb)
|
43 |
+
|
44 |
+
4. Click "Enhance Notebook" to process the file
|
45 |
+
|
46 |
+
5. Download the enhanced notebook
|
47 |
+
|
48 |
+
## How It Works
|
49 |
+
|
50 |
+
The application uses one Hugging Face model:
|
51 |
+
- "sagard21/python-code-explainer" https://huggingface.co/sagard21/python-code-explainer
|
52 |
+
|
53 |
+
|
54 |
+
## Limitations
|
55 |
+
|
56 |
+
- The Hugging Face models have a maximum input token limit, so very long code cells may be truncated
|
57 |
+
- The quality of summaries depends on the clarity and structure of the original code
|
58 |
+
- Processing large notebooks may take some time due to the NLP models
|
59 |
+
- This is a prototype solution; more tweaking is required
|