Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import os
|
| 2 |
import time
|
| 3 |
import uuid
|
| 4 |
-
from typing import List, Tuple, Optional,
|
| 5 |
|
| 6 |
import google.generativeai as genai
|
| 7 |
import gradio as gr
|
|
@@ -9,7 +9,8 @@ from PIL import Image
|
|
| 9 |
|
| 10 |
print("google-generativeai:", genai.__version__)
|
| 11 |
|
| 12 |
-
|
|
|
|
| 13 |
|
| 14 |
TITLE = """<h1 align="center">Gemini Playground 💬</h1>"""
|
| 15 |
SUBTITLE = """<h2 align="center">Play with Gemini Pro and Gemini Pro Vision</h2>"""
|
|
|
|
| 1 |
import os
|
| 2 |
import time
|
| 3 |
import uuid
|
| 4 |
+
from typing import List, Tuple, Optional, Union
|
| 5 |
|
| 6 |
import google.generativeai as genai
|
| 7 |
import gradio as gr
|
|
|
|
| 9 |
|
| 10 |
print("google-generativeai:", genai.__version__)
|
| 11 |
|
| 12 |
+
# Obtener la clave API desde las variables de entorno
|
| 13 |
+
GOOGLE_API_KEY = os.getenv("GOOGLE_API_KEY")
|
| 14 |
|
| 15 |
TITLE = """<h1 align="center">Gemini Playground 💬</h1>"""
|
| 16 |
SUBTITLE = """<h2 align="center">Play with Gemini Pro and Gemini Pro Vision</h2>"""
|