tracinginsights commited on
Commit
87a7677
·
1 Parent(s): 9ecd65d

Update pages/Race_Trace.py

Browse files
Files changed (1) hide show
  1. pages/Race_Trace.py +5 -8
pages/Race_Trace.py CHANGED
@@ -2,16 +2,13 @@ from repo_directory import button
2
  import streamlit as st
3
  from repo_directory import Race_Trace
4
  import pandas as pd
5
- import kaggle
6
- import os
7
-
8
 
9
- KAGGLE_USERNAME = os.environ['KAGGLE_USERNAME']
10
- KAGGLE_KEY = os.environ['KAGGLE_KEY']
11
 
12
- # download the files from dataset
13
- kaggle.api.authenticate()
14
- kaggle.api.dataset_download_files('jtrotman/formula-1-race-events', path='formula-1-race-events', unzip=True)
 
15
 
16
 
17
  Race_Trace.get_latest_ergast()
 
2
  import streamlit as st
3
  from repo_directory import Race_Trace
4
  import pandas as pd
 
 
 
5
 
6
+ import os
 
7
 
8
+ from kaggle.api.kaggle_api_extended import KaggleApi
9
+ api = KaggleApi()
10
+ api.authenticate()
11
+ api.dataset_download_files('jtrotman/formula-1-race-events', path='formula-1-race-events', unzip=True)
12
 
13
 
14
  Race_Trace.get_latest_ergast()