Skip to content
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

initial commit #2

Merged
merged 1 commit into from
Feb 3, 2025
Merged

initial commit #2

merged 1 commit into from
Feb 3, 2025

Conversation

deep-diver
Copy link
Owner

This is initial version, and will be updated.

Screenshot 2025-02-01 at 1 18 27 PM

@deep-diver deep-diver requested a review from sayakpaul February 1, 2025 04:21
Comment on lines +1 to +3
/* #summary-window {
text-align: center;
} */
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need this?

Copy link
Owner Author

Choose a reason for hiding this comment

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

it is placeholder for future use. I think we are going to need to enhance UI a bit later.

Comment on lines +10 to +22
def setup_gemini_client(args):
if args.vertexai:
client = genai.Client(
vertexai=args.vertexai,
project=args.vertexai_project,
location=args.vertexai_location
)
else:
client = genai.Client(
api_key=args.ai_studio_api_key,
)

return client
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the difference between the two?

Copy link
Owner Author

Choose a reason for hiding this comment

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

it should be documented somewhere later.

Google supports Gemini API access both directly from Vertex AI and indirectly from AI Studio (AI Studio is essentially connected to Vertex AI, but it is more user friendly).

For both cases, the client should be setup differently. This code snippet is reflecting that.

Copy link
Collaborator

@sayakpaul sayakpaul left a comment

Choose a reason for hiding this comment

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

Thanks for working on this!

How about we set up an org on the HF Hub and host this gradio app on HF Spaces from there?

Maybe we could create a separate GCP project to have a shared API key or something?

@deep-diver
Copy link
Owner Author

Thanks for working on this!

How about we set up an org on the HF Hub and host this gradio app on HF Spaces from there?

Maybe we could create a separate GCP project to have a shared API key or something?

I will create an org on the HF Hub and invite you today!
About API key sharing, I don't have experience on having a shared GCP project yet.

  • for me, setting up two secrets and use them interleaving is more intuitive :)

@sayakpaul sayakpaul merged commit 8071cd5 into main Feb 3, 2025
@sayakpaul sayakpaul deleted the initial-commit branch February 3, 2025 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants