Ari1020 commited on
Commit
8c8bee0
·
verified ·
1 Parent(s): dbaa740

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -10
app.py CHANGED
@@ -1,20 +1,15 @@
1
  import gradio as gr
2
- from huggingface_hub import InferenceClient, Repository
3
 
4
  """
5
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
6
  """
7
 
 
8
 
9
- # Initialize the repository object
10
- repo = Repository(
11
- local_dir="./",
12
- repo_id="Ari1020/private_informations",
13
- repo_type="space",
14
- )
15
-
16
- # Get the secret from the Hugging Face Hub
17
- flag = repo.get_secret("flag")
18
 
19
 
20
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
 
1
  import gradio as gr
2
+ from huggingface_hub import InferenceClient
3
 
4
  """
5
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
6
  """
7
 
8
+ from huggingface_hub import HfApi
9
 
10
+ api = HfApi()
11
+ full_repo_name = api.get_full_repo_name("Ari1020/private_informations")
12
+ secret = api.get_secret(full_repo_name, "flag")
 
 
 
 
 
 
13
 
14
 
15
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")