-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Audio_Music_code_analyst.ipynb examples #760
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
edit complated apikey
google-genai updated
@@ -0,0 +1,406 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line #4. # Import necessary libraries
Try moving imports to the cell, where they are being used for the first time.
Reply via ReviewNB
@@ -0,0 +1,406 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line #8. gemini_api_key = "AIzaSyAcVvKI84ehXh4zgWw3gCeHuq8gi99nPN8"
You should NEVER EVER expose your api key, you shoul not only remove this from your PR, but also from your Google Cloud's account. This can easily be stolen and misused.
Reply via ReviewNB
@@ -0,0 +1,406 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line #14. genai.configure(api_key=gemini_api_key)
You are using the deprecated version of the google genai package, use the latest google-genai
.
Also this is not how you add API keys to the code, you have to used google-colab secret keys for this, you should refer to the template notebook for this.
Reply via ReviewNB
@@ -0,0 +1,406 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've defined these great data models. Why aren't you parsing the JSON response directly into a ChordProgression object? That would give you typed objects immediately.
Reply via ReviewNB
@@ -0,0 +1,406 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line #18. root_note: str # C, D, E, F, G, A, B
I feel like these comments are naive.
Reply via ReviewNB
@@ -0,0 +1,406 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line #7. if not os.path.exists(audio_path):
Moreover I think this is blatantly wrong to give out pseudo results.
Reply via ReviewNB
I have pointed out a few issues that stand out, but there are still many formatting-related issues. You should first read the Contributing guide for that. |
@@ -0,0 +1,406 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Audio_Music_code_analyst.ipynb examples