Generation Parameters
import requests
if __name__ == "__main__":
input_text = 'List 3 things to do in London.'
url = "http://localhost:8000/generate_stream"
json = {
"text":input_text,
"sampling_temperature":0.1,
"no_repeat_ngram_size":3
}
response = requests.post(url, json=json, stream=True)
response.encoding = 'utf-8'
for text in response.iter_content(chunk_size=1, decode_unicode=True):
if text:
print(text, end="", flush=True)Parameter Name
Description
Default Value
Last updated