Update README.md
Browse files
README.md
CHANGED
@@ -39,7 +39,8 @@ from time import sleep
|
|
39 |
from tqdm.auto import tqdm, trange
|
40 |
|
41 |
API_URL = "https://api-inference.huggingface.co/models/jslin09/bloom-560m-finetuned-fraud"
|
42 |
-
|
|
|
43 |
|
44 |
def query(payload):
|
45 |
response = requests.post(API_URL, headers=headers, json=payload)
|
|
|
39 |
from tqdm.auto import tqdm, trange
|
40 |
|
41 |
API_URL = "https://api-inference.huggingface.co/models/jslin09/bloom-560m-finetuned-fraud"
|
42 |
+
API_TOKEN = 'XXXXXXXXXXXXXXX' # 調用模型的 API token
|
43 |
+
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
44 |
|
45 |
def query(payload):
|
46 |
response = requests.post(API_URL, headers=headers, json=payload)
|