Skip to content

Feat/651 Outfit Assistant Notebook #658

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 6 commits into
base: main
Choose a base branch
from

Conversation

GurneeshBudhiraja
Copy link

Feature id: #651

Jupyter notebook implementation of outfit assistant using Gemini 2.0 flash model.

  • The Jupyter notebook contains the implementation for the outfit assistant.
  • It uses the Gemini's multimodality and great understanding of the real world to recommend outfit based on the user's preference, temperature of the place where user lives, and the occasion for which the user wants a recommendation.
  • The implementation showcases Gemini's flash model's capability to take and process multiple images, raw weather data and user entered information all at the same time.

Thank you and looking forward to the feedback. 😃

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 Apr 4, 2025
@GurneeshBudhiraja
Copy link
Author

Can anyone review this?

@GurneeshBudhiraja GurneeshBudhiraja force-pushed the feat/651-outfit-assistant-example branch from 06c1cb9 to 5ebe25e Compare April 7, 2025 20:14
Copy link

review-notebook-app bot commented Apr 23, 2025

View / edit / reply to this conversation on ReviewNB

Giom-V commented on 2025-04-23T13:55:49Z
----------------------------------------------------------------

Line #1.    %pip install -U -q "google-genai" # Install the Python SDK

Can you add a minimum version, like >=1.0.0?  


Copy link

review-notebook-app bot commented Apr 23, 2025

View / edit / reply to this conversation on ReviewNB

Giom-V commented on 2025-04-23T13:55:50Z
----------------------------------------------------------------

Ideally we should distribute the imports in the cells where they are needed.


Copy link

review-notebook-app bot commented Apr 23, 2025

View / edit / reply to this conversation on ReviewNB

Giom-V commented on 2025-04-23T13:55:51Z
----------------------------------------------------------------

What about using search grounding instead and ask Gemini to check the weather?


Copy link

review-notebook-app bot commented Apr 23, 2025

View / edit / reply to this conversation on ReviewNB

Giom-V commented on 2025-04-23T13:55:52Z
----------------------------------------------------------------

Line #1.    def get_weather(city: str, country: str = "") -> str:

I wouldn't mix helper function and a function that is meant to be used with function calling.

As for the helper functions, they should have a # @title helper functions comment on the first line so they can be collapsed.


Copy link

review-notebook-app bot commented Apr 23, 2025

View / edit / reply to this conversation on ReviewNB

Giom-V commented on 2025-04-23T13:55:53Z
----------------------------------------------------------------

I think it needs a better title, right now it feel like a bit like an AI generated explanatory comment. Maybe just a setup section and a get advices one?


Copy link

review-notebook-app bot commented Apr 23, 2025

View / edit / reply to this conversation on ReviewNB

Giom-V commented on 2025-04-23T13:55:54Z
----------------------------------------------------------------

Where does the images comes from? What's their license? Do we have the rights to use them?


Copy link

review-notebook-app bot commented Apr 23, 2025

View / edit / reply to this conversation on ReviewNB

Giom-V commented on 2025-04-23T13:55:55Z
----------------------------------------------------------------

I would group this and the next two sections into one, with texts instead of titles.


Copy link

review-notebook-app bot commented Apr 23, 2025

View / edit / reply to this conversation on ReviewNB

Giom-V commented on 2025-04-23T13:55:56Z
----------------------------------------------------------------

I think you need to explain a bit more what are the different steps, what are the user preferences and how you build your prompt.


Copy link

review-notebook-app bot commented Apr 23, 2025

View / edit / reply to this conversation on ReviewNB

Giom-V commented on 2025-04-23T13:55:57Z
----------------------------------------------------------------

Line #15.            country = input("🌍 Enter your country to fetch the weather (or press Enter to skip): ").strip()

You shouldn't ask for a country if no city was provided I think.


Copy link

review-notebook-app bot commented Apr 23, 2025

View / edit / reply to this conversation on ReviewNB

Giom-V commented on 2025-04-23T13:55:58Z
----------------------------------------------------------------

Line #22.            elif not WEATHER_API:

I think you should do the check before asking for the location and the country


Copy link

review-notebook-app bot commented Apr 23, 2025

View / edit / reply to this conversation on ReviewNB

Giom-V commented on 2025-04-23T13:55:59Z
----------------------------------------------------------------

Line #69.                model='gemini-2.0-flash',

Can you add a "MODEL_ID" variable like this?

MODEL_ID="gemini-2.0-flash" # @param ["gemini-2.0-flash-lite","gemini-2.0-flash","gemini-2.5-flash-preview-04-17","gemini-2.5-pro-exp-03-25"] {"allow-input":true, isTemplate: true}

As it would make the notebook easier to maintain in the future.


Copy link

review-notebook-app bot commented Apr 23, 2025

View / edit / reply to this conversation on ReviewNB

Giom-V commented on 2025-04-23T13:56:00Z
----------------------------------------------------------------

Why did you added main() three times? Is it to show different examples? You should explain it if that's the case.


Copy link
Collaborator

@Giom-V Giom-V left a comment

Choose a reason for hiding this comment

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

Thanks @GurneeshBudhiraja for the submission and sorry for the delayed review.

I just added a couple of minor comments to make the notebook easier to understand and to maintain.

@@ -79,6 +79,7 @@ Then, explore the other quickstarts tutorials to learn about individual features
## 2. Examples (Practical Use Cases)

These examples demonstrate how to combine multiple Gemini API features or 3rd-party tools to build more complex applications.
* [Outfit Assistant](./examples/Outfit_Assistant.ipynb): Leverages Gemini's multimodality to get outfit recommendations based on the user's preferences, occasion, and temperature of the user's location.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry but I'm trying to keep only Google-made examples on the main README, but you should definitely add a link to yours in the examples/README.md

@Giom-V Giom-V self-assigned this Apr 23, 2025
@andycandy
Copy link
Collaborator

Do you still want to push this @GurneeshBudhiraja?

@GurneeshBudhiraja
Copy link
Author

I am not sure if I would be able to complete this. You can close the PR or take it from here.
Thanks 🙂

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