philschmid HF staff commited on
Commit
68490c8
·
1 Parent(s): 7fd58b1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -4
README.md CHANGED
@@ -49,7 +49,7 @@ ENDPOINT_URL=""# url of your endpoint
49
  HF_TOKEN=""
50
 
51
  # payload samples
52
- regular_payload = { "inputs": "The New Customers Are In Town Today's customers are increasingly demanding, in Asia as elsewhere in the world. Henry Astorga describes the complex reality faced by today's marketers, which includes much higher expectations than we have been used to. Today's customers want performance, and they want it now!"}
53
 
54
  # HTTP headers for authorization
55
  headers= {
@@ -62,6 +62,7 @@ response = r.post(ENDPOINT_URL, headers=headers, json=paramter_payload)
62
  classified = response.json()
63
 
64
  print(classified)
 
65
  ```
66
 
67
 
@@ -69,9 +70,9 @@ print(classified)
69
  **curl example**
70
 
71
  ```bash
72
- curl https://ak7gduay2ypyr9vp.us-east-1.aws.endpoints.huggingface.cloud \
73
  -X POST \
74
- --data-binary 'sample.png' \
75
  -H "Authorization: Bearer XXX" \
76
- -H "Content-Type: null"
77
  ```
 
49
  HF_TOKEN=""
50
 
51
  # payload samples
52
+ regular_payload = { "inputs": "Coming to The Rescue Got a unique problem? Not to worry: you can find a financial planner for every specialized need"}
53
 
54
  # HTTP headers for authorization
55
  headers= {
 
62
  classified = response.json()
63
 
64
  print(classified)
65
+ # [ { "label": "World", "score": 0.12341519122860946 }, { "label": "Sports", "score": 0.11741269832494523 }, { "label": "Business", "score": 0.6124446065942992 }, { "label": "Sci/Tech", "score": 0.14672750385214603 } ]
66
  ```
67
 
68
 
 
70
  **curl example**
71
 
72
  ```bash
73
+ curl https://YOURDOMAIN.us-east-1.aws.endpoints.huggingface.cloud \
74
  -X POST \
75
+ -d '{"inputs": "Coming to The Rescue Got a unique problem? Not to worry: you can find a financial planner for every specialized need"}' \
76
  -H "Authorization: Bearer XXX" \
77
+ -H "Content-Type: application/json"
78
  ```