Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,20 +1,15 @@
|
|
| 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 |
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 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")
|