Skip to content

atudorcarsin/f1-commentary

Repository files navigation

f1-commentary

Bit Camp 2025 Project

ss1.png ss2.png

Description

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.

Pre-requisites

Usage

  1. Create a Python virtual environment
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  2. Install the required packages (requirements.txt)
    pip install -r requirements.txt
  3. Create a .env file with the GEMINI_API_KEY field
    echo "GEMINI_API_KEY=your_api_key" > .env
  4. Create input file for Gemini by running Prepare_Data.py
    python Prepare_Data.py
  5. Run gemini.py to generate short commentary for each row in the CSV file
    python gemini.py
  6. Run f1_dashboard.py to generate a streamlit app that displays the commentary
    streamlit run f1_dashboard.py
  7. That's it! You can now view the commentary by opening Streamlit in your browser

About

Bit Camp 2025 Project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors