akarsh999 commited on
Commit
7a2332d
·
verified ·
1 Parent(s): 2a05f44

Upload 11 files

Browse files
Files changed (1) hide show
  1. athletic_performance.py +15 -14
athletic_performance.py CHANGED
@@ -971,28 +971,29 @@ def get_ai_sports_coaching_analysis(jump_height_cm, user_height_cm, gender, favo
971
  # Format favorite sports list
972
  sports_list = ", ".join(favorite_sports) if favorite_sports else "None specified"
973
 
974
- prompt = f"""Consider yourself an expert sports coach and biomechanics analyst. Based on the following athletic performance data, provide your professional analysis:
975
 
976
- ATHLETE PROFILE:
977
  - Gender: {gender}
978
  - Height: {user_height_cm} cm
979
  - Jump Height: {jump_height_cm:.2f} cm
980
- - Relative Jump Height: {relative_jump_height:.1f}% of body height
981
- - Flight Time: {flight_time_str} seconds
982
- - Peak Power Output: {peak_power_str} watts
983
- - Rate of Force Development: {rfd_str}
984
- - Favorite Sports: {sports_list}
985
 
986
- ANALYSIS REQUIRED:
987
- Please provide a comprehensive analysis with exactly these two sections:
988
 
989
- 1. PERFORMANCE PERCENTILE RANKING:
990
- Based on the athlete's jump performance metrics, provide percentile rankings (e.g., 75th percentile, 90th percentile) for each of their favorite sports: {sports_list}. Consider how their explosive power, jump ability, and biomechanical characteristics would rank against typical athletes in each sport. Be specific about what percentile they would fall into for each sport and explain the reasoning.
 
 
 
991
 
992
- 2. COMBINED PERFORMANCE IMPROVEMENT RECOMMENDATIONS:
993
- Provide exactly 3-4 key improvement pointers that would enhance their athletic performance across all their favorite sports. Focus on actionable, evidence-based recommendations that address their jump technique, training methods, and performance optimization. Each pointer should be practical and directly applicable to improving their athletic capabilities.
 
 
 
994
 
995
- Please format your response clearly with these two distinct sections and provide specific, professional recommendations."""
996
 
997
  # Prepare the API request - try Gemini 1.5 Pro as fallback
998
  url = "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro:generateContent"
 
971
  # Format favorite sports list
972
  sports_list = ", ".join(favorite_sports) if favorite_sports else "None specified"
973
 
974
+ prompt = f"""You are a sports coach. Based on this athlete's jump performance, provide a simple analysis:
975
 
976
+ ATHLETE DATA:
977
  - Gender: {gender}
978
  - Height: {user_height_cm} cm
979
  - Jump Height: {jump_height_cm:.2f} cm
980
+ - Sports: {sports_list}
 
 
 
 
981
 
982
+ PROVIDE EXACTLY THIS FORMAT:
 
983
 
984
+ **PERCENTILE RANKINGS:**
985
+ - Basketball: [number]th percentile
986
+ - Volleyball: [number]th percentile
987
+ - Swimming: [number]th percentile
988
+ (Only include the sports from their list: {sports_list})
989
 
990
+ **IMPROVEMENT TIPS:**
991
+ 1. [One simple sentence about technique]
992
+ 2. [One simple sentence about training]
993
+ 3. [One simple sentence about strength/power]
994
+ 4. [One simple sentence about specific skill]
995
 
996
+ Keep it simple for beginner athletes. Use basic English. No long explanations."""
997
 
998
  # Prepare the API request - try Gemini 1.5 Pro as fallback
999
  url = "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-pro:generateContent"