Skip to content

Commit 8f183e8

Browse files
committed
Add a health endpoint
1 parent ae5920c commit 8f183e8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
# Initialize the Hugging Face tokenizer using the same model name
1717
tokenizer = AutoTokenizer.from_pretrained(model_name)
1818

19+
@app.route('/health', methods=['GET'])
20+
def health():
21+
return jsonify({"status": "ok"}), 200
22+
1923
@app.route('/embed', methods=['POST'])
2024
def embed_text():
2125
data = request.json

0 commit comments

Comments
 (0)