F1-analysis / app.py
tracinginsights's picture
Update app.py
9a959bf
raw
history blame
810 Bytes
from git import Repo
import os
import streamlit as st
import kaggle
st.set_page_config(
page_title="TRACING INSIGHTS",
page_icon=None,
layout="wide",
initial_sidebar_state="expanded",
# menu_items={
# 'Get Help': 'https://www.extremelycoolapp.com/help',
# 'Report a bug': "https://www.extremelycoolapp.com/bug",
# 'About': "# This is a header. This is an *extremely* cool app!"
# }
)
GITHUB_PAT = os.environ['GITHUB']
if not os.path.exists('repo_directory'):
Repo.clone_from(f'https://tracinginsights:{GITHUB_PAT}@github.com/TracingInsights/F1_analysis.git', 'repo_directory' )
def download_dataset():
kaggle.api.authenticate()
kaggle.api.dataset_download_files('jtrotman/formula-1-race-events', path='formula-1-race-events', unzip=True)