File size: 1,661 Bytes
19f1030
 
938d60d
19f1030
 
 
 
 
 
 
 
e60fb94
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
title: NoteGenie
emoji: πŸ“”
colorFrom: red
colorTo: pink
sdk: docker
pinned: false
license: mit
short_description: ipynb file generator using Gemini models to create notebooks
---

# NoteGenie

NoteGenie is an AI-powered Jupyter notebook generator that uses Google's Gemini models to create and edit notebooks from text prompts.

## Features

- Generate complete Jupyter notebooks with a text prompt
- Edit existing notebooks with text instructions
- Preview notebooks in the web interface
- Download notebooks as .ipynb files
- Streaming responses for a better user experience

## Deployment on Hugging Face Spaces

1. Create a new Space on Hugging Face
2. Choose Docker template
3. Upload this repository to the Space
4. Set the following environment variables in your Space settings:
   - SECRET_KEY: A secure random string for Flask sessions
   - PORT: 7860 (default for Hugging Face Spaces)

## Local Development

1. Install dependencies:
   ```
   pip install -r requirements.txt
   ```

2. Run the application:
   ```
   python app.py
   ```

3. Open http://localhost:5000 in your browser

## Using Docker

Build and run the Docker container:

```bash
docker build -t notegenie .
docker run -p 7860:7860 -e SECRET_KEY=your_secret_key notegenie
```

## Environment Variables

- SECRET_KEY: Secret key for Flask session encryption
- PORT: Port to run the application on (defaults to 5000 locally, 7860 for Hugging Face)
- FLASK_ENV: Set to "development" for debug mode, "production" for production

## API Key Setup

NoteGenie requires a Google Gemini API key. Users can set their own API key in the web interface.

## License

[MIT License](LICENSE)