Skip to content

Commit

Permalink
fix text-sentiment example http runtime client
Browse files Browse the repository at this point in the history
Signed-off-by: Aarno Aukia <[email protected]>
  • Loading branch information
arska committed Nov 3, 2023
1 parent d492efb commit 04ab603
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/text-sentiment/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@
port = 8080
# Run inference for two sample prompts
for text in ["I am not feeling well today!", "Today is a nice sunny day"]:
payload = {"inputs": text}
payload = {"inputs": text, "model_id": model_id}
response = requests.post(
f"http://localhost:{port}/api/v1/{model_id}/task/hugging-face-sentiment",
f"http://localhost:{port}/api/v1/task/hugging-face-sentiment",
json=payload,
timeout=1,
)
Expand Down

0 comments on commit 04ab603

Please sign in to comment.