Roobick commited on
Commit
e9d2479
·
1 Parent(s): a678f86

Reorder import statement for KaggleApi in app.py and ensure credentials bootstrap function is called correctly

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,7 +1,6 @@
1
  import gradio as gr
2
  import os, json, pathlib, tempfile
3
  from typing import List, Dict
4
- from kaggle.api.kaggle_api_extended import KaggleApi
5
 
6
  from dotenv import load_dotenv
7
  load_dotenv()
@@ -85,8 +84,9 @@ def _bootstrap_kaggle_credentials():
85
  cred_path.write_text(json.dumps({"username": user, "key": key}))
86
  cred_path.chmod(0o600)
87
 
88
- _bootstrap_kaggle_credentials()
89
 
 
90
  api = KaggleApi()
91
  api.authenticate()
92
 
 
1
  import gradio as gr
2
  import os, json, pathlib, tempfile
3
  from typing import List, Dict
 
4
 
5
  from dotenv import load_dotenv
6
  load_dotenv()
 
84
  cred_path.write_text(json.dumps({"username": user, "key": key}))
85
  cred_path.chmod(0o600)
86
 
87
+ _bootstrap_kaggle_credentials()
88
 
89
+ from kaggle.api.kaggle_api_extended import KaggleApi
90
  api = KaggleApi()
91
  api.authenticate()
92