diff --git a/api/salience-editor-api.nomad.hcl b/api/salience-editor-api.nomad.hcl index b4de70e..e83ca2b 100644 --- a/api/salience-editor-api.nomad.hcl +++ b/api/salience-editor-api.nomad.hcl @@ -98,7 +98,7 @@ curl -s "$host/models" echo echo "=== /salience ===" -curl -s -X POST -d "The cat sat on the mat. The dog chased the cat." "$host/salience?model=all-mpnet-base-v2" +curl -s --data-binary -H "Content-Type: text/plain" "The cat sat on the mat. The dog chased the cat." "$host/salience?model=all-mpnet-base-v2" echo EOH destination = "local/smoke-test.sh" diff --git a/api/salience/timed_import.py b/api/salience/timed_import.py index dc6ad48..23241bc 100644 --- a/api/salience/timed_import.py +++ b/api/salience/timed_import.py @@ -17,4 +17,5 @@ class timed_import: def __exit__(self, *args): elapsed = time.time() - self.start - print(f"in {elapsed:.1f}s") + sys.stdout.write(f"in {elapsed:.1f}s\n") + sys.stdout.flush()