MySafeCode commited on
Commit
1cbaf1e
·
verified ·
1 Parent(s): e8421c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -2,13 +2,8 @@ import gradio as gr
2
  from huggingface_hub import HfApi
3
  import os
4
 
5
- # Initialize HfApi
6
- token = os.getenv("HF_TOKEN") # or whatever your secret name is
7
 
8
- if not token:
9
- raise RuntimeError("Missing Hugging Face secret. Check your Space → Settings → Secrets.")
10
-
11
- api = HfApi(token=token)
12
 
13
 
14
  def upload_file_to_hub(file_path, repo_id, path_in_repo, token, repo_type, commit_message):
 
2
  from huggingface_hub import HfApi
3
  import os
4
 
 
 
5
 
6
+ api = HfApi()
 
 
 
7
 
8
 
9
  def upload_file_to_hub(file_path, repo_id, path_in_repo, token, repo_type, commit_message):