viswanani commited on
Commit
c170ce9
·
verified ·
1 Parent(s): c44fbe3

Create report.py

Browse files
Files changed (1) hide show
  1. report.py +10 -0
report.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+
3
+ def export_json_report(speed, bounce_frame, lbw_decision, output_path="report.json"):
4
+ report = {
5
+ "lbw_decision": lbw_decision,
6
+ "speed_kmph": round(speed, 2),
7
+ "bounce_frame": bounce_frame
8
+ }
9
+ with open(output_path, "w") as f:
10
+ json.dump(report, f, indent=2)