Skip to content

Commit

Permalink
Merge branch 'main' into feat/evals-results
Browse files Browse the repository at this point in the history
  • Loading branch information
vincelwt authored Mar 31, 2024
2 parents 8c75d9f + 43ca09c commit 2e7cc1d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/frontend/pages/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ function LoginPage() {
async function determineAuthMethod(email: string) {
setLoading(true)
try {
// clear any leftover token
window.localStorage.clear()

const { method, redirect } = await fetcher.post("/auth/method", {
arg: {
email,
Expand Down
5 changes: 5 additions & 0 deletions packages/ml/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
cli = sys.modules['flask.cli']
cli.show_server_banner = lambda *x: None

@app.route('/health', methods=['GET'])
def health_check():
return jsonify({"status": "healthy"}), 200

@app.route('/lang', methods=['POST'])
def language_route():
text = request.json['text']
Expand All @@ -22,6 +26,7 @@ def toxicity_route():
results = detect_toxicity(texts)
return jsonify(results)

# TODO: index errors
@app.route('/pii', methods=['POST'])
def pii_route():
model_id = request.json.get('bert_model', None)
Expand Down

0 comments on commit 2e7cc1d

Please sign in to comment.