Skip to content

Commit

Permalink
nanogpt
Browse files Browse the repository at this point in the history
  • Loading branch information
Aayush Bajaj authored and Aayush Bajaj committed Dec 30, 2024
1 parent 5ed4ea3 commit b009e21
Show file tree
Hide file tree
Showing 12 changed files with 40,353 additions and 50 deletions.
4 changes: 4 additions & 0 deletions assets/css/non-critical/10-custom-media.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
Bootstrap 5 breakpoints
See: https://getbootstrap.com/docs/5.0/layout/breakpoints/#available-breakpoints
*/
.language-jupyter-python {
@apply .language-python;
}

@custom-media --sm (min-width: 576px);
@custom-media --md (min-width: 768px);
@custom-media --lg (min-width: 992px);
Expand Down
5 changes: 5 additions & 0 deletions assets/js/prism.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Prism from "prismjs";



{{ range $.Site.Params.prism.languages }}
import "prismjs/components/prism-{{ . }}";
{{ end }}
Expand All @@ -8,4 +10,7 @@ import Prism from "prismjs";
import "prismjs/plugins/{{ . }}/prism-{{ . }}";
{{ end }}

const alias = "jupyter-python";
Prism.languages[alias] = Prism.languages.python;

Prism.highlightAll();
1 change: 1 addition & 0 deletions config/_default/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ enableGitInfo = true
autoHeadingID = true
autoHeadingIDType = 'blackfriday'


[imaging]
# JPEG and WebP quality
quality = 90
Expand Down
22 changes: 0 additions & 22 deletions content/projects/dl/#Kanye-West-RNN.py#

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 1 addition & 28 deletions content/projects/dl/Kanye-West-RNN.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,2 @@
# Fetch Kanye West's songs
artist = genius.search_artist("Kanye West", max_songs=100, sort="title")

# Save lyrics to a text file
with open("kanye_lyrics.txt", "w") as file:
for song in artist.songs:
file.write(song.lyrics + "\n\n")

#now we clean the data:

# Load raw lyrics
with open("kanye_lyrics.txt", "r") as file:
raw_data = file.read()

# Clean lyrics
cleaned_data = re.sub(r"\[.*?\]", "", raw_data) # Remove metadata like [Chorus]
cleaned_data = re.sub(r"\s+", " ", cleaned_data) # Replace multiple spaces with one

# Save cleaned lyrics
with open("cleaned_kanye_lyrics.txt", "w") as file:
file.write(cleaned_data)

import numpy as np
import pandas as pd
import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import LSTM, Dense, Embedding
from tensorflow.keras.preprocessing.text import Tokenizer
from tensorflow.keras.preprocessing.sequence import pad_sequences
print("hello world")
Loading

0 comments on commit b009e21

Please sign in to comment.