JoanaS commited on
Commit
b96f5c7
·
verified ·
1 Parent(s): 2953c83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -4,9 +4,11 @@ import gradio as gr
4
  from huggingface_hub import snapshot_download
5
  import os
6
 
 
 
7
  def load_model(repo_id):
8
  # Download the snapshot
9
- download_dir = snapshot_download(repo_id, token=HF_Token)
10
  print(f"Downloaded snapshot directory: {download_dir}")
11
 
12
  # Check the contents of the directory
 
4
  from huggingface_hub import snapshot_download
5
  import os
6
 
7
+ hf_token = os.getenv("HF_TOKEN") # This will be automatically available in your Space
8
+
9
  def load_model(repo_id):
10
  # Download the snapshot
11
+ download_dir = snapshot_download(repo_id, token=hf_token)
12
  print(f"Downloaded snapshot directory: {download_dir}")
13
 
14
  # Check the contents of the directory