Closed davidlenz closed 4 years ago
I am not sure about the data being a tuple, but that might be right. Do you know what the empty string does at the end of the tuple?
Thanks @dmmiller612, that was a hint in the right direction ( i have no clue what the empty string is supposed to do). Changed it to
def query_bert_summarizer(text, ratio=0.1, ip=''):
"""
Query a remote Bert summarizer
"""
headers = {
'Content-Type': 'text/plain',
}
params = (
('ratio', ratio),
)
data = text
response = requests.post(f'http://{ip}:5000/summarize', headers=headers, params=params, data=data)
return response
and it works like a charm now. thanks again!
Hi, great project, thanks a lot!
Server returns an empty summary when i try the example's text using python requests with a cloud machine. Dunno what i'm missing.
Works perfectly fine with
curl
on the cloud machineSetup:
bert-extractive-summarizer
runs on a digitalocean docker image.Query code (replace < IP > ) :