Inspiration
Create an app where fans can upload photos of MLB players and get stats!
What it does
- User uploads photo, selects language, enters email, and clicks button
- Gemini analyzes photo and provides player name
- App collects email, language, and player name to provide email updates about player
- App uses player name to get player attributes from MLB GUMBO API
- App uses player name to get player stats from MLB GUMBO API
- App translates column headers based on language selected
- App outputs tables with stats and a player description in selected language
How we built it
- Learned how to build basic image analysis app from "Udemy course called Building Gen AI App 12+ Hands-on Projects with Gemini Pro" by Krish Naik (https://www.udemy.com/course/building-gen-ai-app-end-to-end-projects-with-gemini-pro/)
- Created image analysis app with Python
- Added logic to get player attributes from MLB GUMBO API (See https://colab.research.google.com/drive/1QcZD-_VK-Fa9ZC_iNy6Cth0n67KF2dSC?usp=sharing)
- Added logic to get player stats from MLB GUMBO API (Found examples in forums on internet)
- Added logic to translate app into multiple languages
- Integrated app with database to collect user data
- Added logic to display stats, send stats to Gemini, and generate text summary in selected language
- Added user feedback mechanism
- Tested and refined app
Challenges we ran into
- Player name from image is not always accurate. The app performs best when the player's number is visible
- Data from MLB GUMBO API was not in presentable format and had to manipulate data to create tables
- Adding languages and storing user data required additional functionality
- Collecting user feedback was not part of initial plan, but added this functionality so users could consent to future emails and not get email updates about the wrong player when image analysis is incorrect
Accomplishments that we're proud of
Building an image analysis app that successfully communicates with the MLB GUMBO API!
What we learned
How to create an image analysis app, integrate with the MLB stats API, and store data in Google Cloud Firestore database
What's next for MLB StatShot
Send periodic emails with updated player stats and provide more types of data!
Built With
- ai
- firestore
- gemini
- google-cloud
- mlb-stats-api
- python
- streamlit

Log in or sign up for Devpost to join the conversation.