Commit
•
74fcb39
1
Parent(s):
2d51472
Update README.md
Browse files
README.md
CHANGED
@@ -39,11 +39,11 @@ ENDPOINT_URL=""# url of your endpoint
|
|
39 |
HF_TOKEN=""
|
40 |
|
41 |
# payload samples
|
42 |
-
regular_payload = { "inputs": "" }
|
43 |
parameter_payload = {
|
44 |
-
"inputs": "
|
45 |
"parameters" : {
|
46 |
-
"
|
47 |
}
|
48 |
}
|
49 |
|
@@ -58,4 +58,5 @@ response = r.post(ENDPOINT_URL, headers=headers, json=paramter_payload)
|
|
58 |
generated_text = response.json()
|
59 |
|
60 |
print(generated_text)
|
|
|
61 |
```
|
|
|
39 |
HF_TOKEN=""
|
40 |
|
41 |
# payload samples
|
42 |
+
regular_payload = { "inputs": "translate English to German: The weather is nice today." }
|
43 |
parameter_payload = {
|
44 |
+
"inputs": "translate English to German: Hello my name is Philipp and I am a Technical Leader at Hugging Face",
|
45 |
"parameters" : {
|
46 |
+
"max_length": 40,
|
47 |
}
|
48 |
}
|
49 |
|
|
|
58 |
generated_text = response.json()
|
59 |
|
60 |
print(generated_text)
|
61 |
+
|
62 |
```
|