Spaces:
Running
Running
Anthonyg5005
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import sys
|
|
7 |
try:
|
8 |
GEMINI_API_KEY = os.environ["GEMINI_API_KEY"]
|
9 |
except:
|
10 |
-
sys.exit("Please set the environment variable GEMINI_API_KEY to your API key.\nYou can get an API key by signing up at https://aistudio.google.com/app/apikey")
|
11 |
|
12 |
#gemini configuration stuffs
|
13 |
generation_config = {
|
@@ -291,7 +291,7 @@ with gr.Blocks() as demo:
|
|
291 |
|
292 |
gr.Markdown(r"""
|
293 |
By using this demo, you are agreeing to the [Google API TOS](https://developers.google.com/terms), [Gemini API TOS](https://ai.google.dev/gemini-api/terms), and [Google Privacy Polocy](https://ai.google.dev/gemini-api/terms).\
|
294 |
-
For more information on what gets collected in this space, check out the [Unpaid Services](https://ai.google.dev/gemini-api/terms#unpaid-services) section from the Gemini API
|
295 |
Feel free to duplicate this space or run locally to use your own api key for more control over how your data is handled.
|
296 |
""")
|
297 |
|
|
|
7 |
try:
|
8 |
GEMINI_API_KEY = os.environ["GEMINI_API_KEY"]
|
9 |
except:
|
10 |
+
sys.exit("Please set the environment variable GEMINI_API_KEY to your API key.\nIf using HF Spaces, set you API key as a secret called GEMINI_API_KEY in the space settings\nYou can get an API key by signing up at https://aistudio.google.com/app/apikey")
|
11 |
|
12 |
#gemini configuration stuffs
|
13 |
generation_config = {
|
|
|
291 |
|
292 |
gr.Markdown(r"""
|
293 |
By using this demo, you are agreeing to the [Google API TOS](https://developers.google.com/terms), [Gemini API TOS](https://ai.google.dev/gemini-api/terms), and [Google Privacy Polocy](https://ai.google.dev/gemini-api/terms).\
|
294 |
+
For more information on what gets collected in this space, check out the [Unpaid Services](https://ai.google.dev/gemini-api/terms#unpaid-services) section from the Gemini API Terms. U.S. Terms always apply to this space: [Anthonyg5005/gemini-translator](https://huggingface.co/spaces/Anthonyg5005/gemini-translator)\
|
295 |
Feel free to duplicate this space or run locally to use your own api key for more control over how your data is handled.
|
296 |
""")
|
297 |
|