George Sergia commited on
Commit
594d1d1
·
1 Parent(s): bbfc23a

Quick test

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -21,9 +21,15 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
21
  """
22
 
23
  load_dotenv()
24
-
25
  HF_TOKEN = os.getenv("HF_TOKEN")
 
 
 
 
 
 
26
 
 
27
  # --- Determine HF Space Runtime URL and Repo URL ---
28
  space_id = os.getenv("SPACE_ID") # Get the SPACE_ID for sending link to the code
29
 
@@ -174,6 +180,7 @@ with gr.Blocks() as demo:
174
 
175
  if __name__ == "__main__":
176
  print("\n" + "-"*30 + " App Starting " + "-"*30)
 
177
  # Check for SPACE_HOST and SPACE_ID at startup for information
178
  space_host_startup = os.getenv("SPACE_HOST")
179
  space_id_startup = os.getenv("SPACE_ID") # Get SPACE_ID at startup
 
21
  """
22
 
23
  load_dotenv()
 
24
  HF_TOKEN = os.getenv("HF_TOKEN")
25
+ if HF_TOKEN is not None:
26
+ print(str(hash(HF_TOKEN)))
27
+
28
+ HF_TOKEN = os.getenv("HF_TOKEN")
29
+ if HF_TOKEN is not None:
30
+ print(str(hash(HF_TOKEN)))
31
 
32
+ return "Please Login to Hugging Face with the button.", None
33
  # --- Determine HF Space Runtime URL and Repo URL ---
34
  space_id = os.getenv("SPACE_ID") # Get the SPACE_ID for sending link to the code
35
 
 
180
 
181
  if __name__ == "__main__":
182
  print("\n" + "-"*30 + " App Starting " + "-"*30)
183
+
184
  # Check for SPACE_HOST and SPACE_ID at startup for information
185
  space_host_startup = os.getenv("SPACE_HOST")
186
  space_id_startup = os.getenv("SPACE_ID") # Get SPACE_ID at startup