adrienbrdne commited on
Commit
7e0a415
·
verified ·
1 Parent(s): c1f79bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -10,6 +10,7 @@ from googleapiclient.http import MediaIoBaseDownload, MediaIoBaseUpload
10
  # Environment variables
11
  FOLDER_ID = os.getenv("FOLDER_ID")
12
  GOOGLE_CREDENTIALS = os.environ.get("GOOGLE_CREDENTIALS")
 
13
 
14
  def create_new_file_in_drive(username, dataframe_to_upload, credentials_json, folder_id):
15
  """Crée un nouveau fichier CSV dans Google Drive à partir d'un DataFrame Pandas."""
@@ -60,9 +61,9 @@ def main():
60
 
61
  # Charger le fichier CSV
62
  try:
63
- df = pd.read_csv("evaluation_dataset.csv", sep=';')
64
  except FileNotFoundError:
65
- st.error("evaluation_dataset.csv not found. Please upload the file.")
66
  return
67
 
68
  # Initialisation des variables de session
 
10
  # Environment variables
11
  FOLDER_ID = os.getenv("FOLDER_ID")
12
  GOOGLE_CREDENTIALS = os.environ.get("GOOGLE_CREDENTIALS")
13
+ DATASET_NAME = os.environ.get("DATASET_NAME")
14
 
15
  def create_new_file_in_drive(username, dataframe_to_upload, credentials_json, folder_id):
16
  """Crée un nouveau fichier CSV dans Google Drive à partir d'un DataFrame Pandas."""
 
61
 
62
  # Charger le fichier CSV
63
  try:
64
+ df = pd.read_csv(DATASET_NAME, sep=';')
65
  except FileNotFoundError:
66
+ st.error(f"{DATASET_NAME} not found. Please upload the file.")
67
  return
68
 
69
  # Initialisation des variables de session