Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,18 +14,6 @@ from huggingface_hub import InferenceApi
|
|
14 |
api_key = os.getenv("GROQ_API_KEY")
|
15 |
client = Groq(api_key=api_key)
|
16 |
|
17 |
-
# # Retrieve Hugging Face API key from environment variable
|
18 |
-
# HF_API_KEY = os.getenv("HF_API_KEY")
|
19 |
-
|
20 |
-
# if HF_API_KEY is None:
|
21 |
-
# raise ValueError("Hugging Face API key not found. Please set it as an environment variable.")
|
22 |
-
|
23 |
-
# # Login to Hugging Face
|
24 |
-
# try:
|
25 |
-
# login(HF_API_KEY)
|
26 |
-
# print("Login successful!")
|
27 |
-
# except Exception as e:
|
28 |
-
# print(f"Error during Hugging Face login: {str(e)}")
|
29 |
|
30 |
# Set device: CUDA if available, else CPU
|
31 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
|
14 |
api_key = os.getenv("GROQ_API_KEY")
|
15 |
client = Groq(api_key=api_key)
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
# Set device: CUDA if available, else CPU
|
19 |
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|