Skip to content

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jh941213
Copy link

Audio_Music_code_analyst.ipynb examples

examples
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions github-actions bot added status:awaiting review PR awaiting review from a maintainer component:examples Issues/PR referencing examples folder labels May 11, 2025
Copy link
Author

@jh941213 jh941213 left a 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
@jh941213 jh941213 requested a review from Shi-pra-19 May 11, 2025 22:06
@@ -0,0 +1,406 @@
{
Copy link
Collaborator

@andycandy andycandy May 12, 2025

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 @@
{
Copy link
Collaborator

@andycandy andycandy May 12, 2025

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 @@
{
Copy link
Collaborator

@andycandy andycandy May 12, 2025

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 @@
{
Copy link
Collaborator

@andycandy andycandy May 12, 2025

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 @@
{
Copy link
Collaborator

@andycandy andycandy May 12, 2025

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 @@
{
Copy link
Collaborator

@andycandy andycandy May 12, 2025

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

@andycandy
Copy link
Collaborator

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 @@
{
Copy link
Collaborator

@andycandy andycandy May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to always clear pip install logs.


Reply via ReviewNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:examples Issues/PR referencing examples folder status:awaiting review PR awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants