Bit Camp 2025 Project
Generate F1 commentary based on data provided through a CSV file. Extract real world data from the OpenF1 API and generate commentary using the Gemini AI model.
- Python (3.13)
- Create a Python virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install the required packages (requirements.txt)
pip install -r requirements.txt
- Create a .env file with the GEMINI_API_KEY field
echo "GEMINI_API_KEY=your_api_key" > .env
- Create input file for Gemini by running Prepare_Data.py
python Prepare_Data.py
- Run gemini.py to generate short commentary for each row in the CSV file
python gemini.py
- Run f1_dashboard.py to generate a streamlit app that displays the commentary
streamlit run f1_dashboard.py
- That's it! You can now view the commentary by opening Streamlit in your browser

