Deadmon commited on
Commit
1bcdb8d
·
verified ·
1 Parent(s): cf4cf62

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -8,23 +8,19 @@ import time
8
  import base64
9
  import google.auth
10
  import google.auth.transport.requests
11
- import spaces
12
- from huggingface_hub import login, hf_hub_download
13
 
14
  # --- 1. Configuration and Authentication (Unchanged) ---
15
  GCP_PROJECT_ID = os.environ.get("GCP_PROJECT_ID")
16
  GCP_LOCATION = os.environ.get("GCP_LOCATION")
17
 
18
  # --- Authentication and Sanity Checks Block (Unchanged) ---
19
-
20
-
21
- # Set up HF_TOKEN for Hugging Face Hub authentication
22
  hf_token = os.environ.get("HF_TOKEN")
23
  if hf_token:
24
  print("Hugging Face token found. Logging in.")
25
  login(token=hf_token)
26
  else:
27
- print("WARNING: Hugging Face token ('HF_TOKEN') not found. Hub-related features may be disabled.")
28
 
29
  creds_json_str = os.environ.get("GOOGLE_APPLICATION_CREDENTIALS_JSON")
30
 
 
8
  import base64
9
  import google.auth
10
  import google.auth.transport.requests
11
+ from huggingface_hub import login
 
12
 
13
  # --- 1. Configuration and Authentication (Unchanged) ---
14
  GCP_PROJECT_ID = os.environ.get("GCP_PROJECT_ID")
15
  GCP_LOCATION = os.environ.get("GCP_LOCATION")
16
 
17
  # --- Authentication and Sanity Checks Block (Unchanged) ---
 
 
 
18
  hf_token = os.environ.get("HF_TOKEN")
19
  if hf_token:
20
  print("Hugging Face token found. Logging in.")
21
  login(token=hf_token)
22
  else:
23
+ print("WARNING: Hugging Face token ('HF_TOKEN') not found.")
24
 
25
  creds_json_str = os.environ.get("GOOGLE_APPLICATION_CREDENTIALS_JSON")
26