Spaces:
Sleeping
Sleeping
File size: 904 Bytes
0fc3485 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
import os
import sys
def main():
print("\nπ StyleSync AI - Security Setup")
print("---------------------------------")
print("Please enter your API keys. They will be saved locally to .env")
print("(Get free keys at: console.groq.com | aistudio.google.com | pinecone.io)\n")
groq_key = input("π Enter GROQ_API_KEY: ").strip()
gemini_key = input("π Enter GEMINI_API_KEY: ").strip()
pinecone_key = input("π Enter PINECONE_API_KEY (Optional for Phase 2): ").strip()
env_content = f"GROQ_API_KEY={groq_key}\nGEMINI_API_KEY={gemini_key}\nPINECONE_API_KEY={pinecone_key}\n"
try:
with open(".env", "w", encoding="utf-8") as f:
f.write(env_content)
print("\nβ
.env file created successfully!")
except Exception as e:
print(f"\nβ Failed to write .env: {e}")
sys.exit(1)
if __name__ == "__main__":
main()
|