Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -20,13 +20,13 @@ logger = logging.getLogger(__name__)
|
|
20 |
def clean_api_key(key: str) -> str:
|
21 |
return ''.join(c for c in key if ord(c) < 128).strip()
|
22 |
|
23 |
-
for key in ["GEMINI_API_KEY", "GROQ_API_KEY"
|
24 |
if not os.environ.get(key):
|
25 |
raise ValueError(f"Environment variable {key} is not set. Please set it in the Hugging Face Space secrets.")
|
26 |
|
27 |
gemini_api_key = clean_api_key(os.environ["GEMINI_API_KEY"])
|
28 |
groq_api_key = clean_api_key(os.environ["GROQ_API_KEY"])
|
29 |
-
did_api_key = clean_api_key(os.environ["DID_API_KEY"])
|
30 |
|
31 |
# Initialize Gemini client for calculations
|
32 |
client = genai.Client(api_key=gemini_api_key)
|
|
|
20 |
def clean_api_key(key: str) -> str:
|
21 |
return ''.join(c for c in key if ord(c) < 128).strip()
|
22 |
|
23 |
+
for key in ["GEMINI_API_KEY", "GROQ_API_KEY"]:
|
24 |
if not os.environ.get(key):
|
25 |
raise ValueError(f"Environment variable {key} is not set. Please set it in the Hugging Face Space secrets.")
|
26 |
|
27 |
gemini_api_key = clean_api_key(os.environ["GEMINI_API_KEY"])
|
28 |
groq_api_key = clean_api_key(os.environ["GROQ_API_KEY"])
|
29 |
+
# did_api_key = clean_api_key(os.environ["DID_API_KEY"])
|
30 |
|
31 |
# Initialize Gemini client for calculations
|
32 |
client = genai.Client(api_key=gemini_api_key)
|