-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
/* #summary-window { | ||
text-align: center; | ||
} */ |
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.
Do we need this?
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.
it is placeholder for future use. I think we are going to need to enhance UI a bit later.
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 |
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.
What's the difference between the two?
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.
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.
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.
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!
|
This is initial version, and will be updated.