mimifuel2018 commited on
Commit
9f6ce1a
·
verified ·
1 Parent(s): c07739c

Delete test_token.py

Browse files
Files changed (1) hide show
  1. test_token.py +0 -15
test_token.py DELETED
@@ -1,15 +0,0 @@
1
- import os
2
- import requests
3
-
4
- # Retrieve token from environment variable
5
- token = os.getenv("HF_TOKEN")
6
- headers = {"Authorization": f"Bearer {token}"}
7
-
8
- # Test URL with the model you're trying to access
9
- response = requests.get("https://api-inference.huggingface.co/models/Qwen/Qwen2.5-72B-Instruct", headers=headers)
10
-
11
- # Check response status
12
- if response.status_code == 200:
13
- print("Token is valid and authorized.")
14
- else:
15
- print(f"Error: {response.status_code} - {response.text}")