Automatic push from FunctionsAPI
This commit is contained in:
parent
1219979ed4
commit
bd62453714
9
main.py
Normal file
9
main.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
def calculate_final_score(request):
|
||||||
|
data = request.get_json(silent=True) or {}
|
||||||
|
t = data.get("taskCompletionRate")
|
||||||
|
c = data.get("skillCommunication")
|
||||||
|
l = data.get("skillLeadership")
|
||||||
|
if not all(isinstance(x, (int, float)) for x in [t, c, l]):
|
||||||
|
return {"error": "All inputs must be numbers."}, 400
|
||||||
|
skill = (c + l) / 2
|
||||||
|
return {"finalScore": 0.6 * t + 0.4 * skill}, 200
|
||||||
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
functions-framework==1.4.3
|
||||||
|
markupsafe==2.0.1
|
||||||
Loading…
Reference in New Issue
Block a user