Spaces:
Sleeping
Sleeping
Commit
·
ec89f95
1
Parent(s):
9074c4e
fixes
Browse files
app.py
CHANGED
@@ -7,23 +7,7 @@ from huggingface_hub.errors import HfHubHTTPError
|
|
7 |
"""
|
8 |
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
|
9 |
"""
|
10 |
-
|
11 |
-
# For Hugging Face Spaces, add your token as a secret named HF_TOKEN
|
12 |
-
# https://huggingface.co/docs/hub/spaces-overview#managing-secrets
|
13 |
-
HF_TOKEN = os.environ.get("HF_TOKEN")
|
14 |
-
|
15 |
-
if not HF_TOKEN:
|
16 |
-
print("Warning: No Hugging Face token found in environment variables.")
|
17 |
-
print("For Hugging Face Spaces: Add your token as a secret named HF_TOKEN in the Settings tab.")
|
18 |
-
print("See: https://huggingface.co/docs/hub/spaces-overview#managing-secrets")
|
19 |
-
else:
|
20 |
-
print("HF_TOKEN found in environment variables!")
|
21 |
-
|
22 |
-
client = InferenceClient(
|
23 |
-
"Trinoid/Data_Management_Mistral",
|
24 |
-
token=HF_TOKEN
|
25 |
-
)
|
26 |
-
|
27 |
|
28 |
def respond(
|
29 |
message,
|
|
|
7 |
"""
|
8 |
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
|
9 |
"""
|
10 |
+
client = InferenceClient("Trinoid/Data_Management_Mistral")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
def respond(
|
13 |
message,
|