Fedir-Ilina commited on
Commit
9db1e30
Β·
verified Β·
1 Parent(s): 0afbf5b

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -1295,7 +1295,14 @@ def train_model_lora(
1295
 
1296
  # ── Dataset: carregar do disco ou tokenizar ────────────────────────
1297
  tokenized_path = os.path.join(output_dir, "tokenized_dataset")
1298
-
 
 
 
 
 
 
 
1299
  if os.path.exists(tokenized_path):
1300
  log_info("Dataset tokenizado encontrado no disco. A carregar...")
1301
  tokenized_datasets = load_from_disk(tokenized_path)
 
1295
 
1296
  # ── Dataset: carregar do disco ou tokenizar ────────────────────────
1297
  tokenized_path = os.path.join(output_dir, "tokenized_dataset")
1298
+ #----------------------------------------------------------------------------
1299
+ # Depois de tokenizar o dataset
1300
+ if os.path.exists(tokenized_path):
1301
+ HF_BUCKET_DATASET = "hf://buckets/Fedir-Ilina/Train_CPU/tokenized_dataset" # definir nome do bucket
1302
+ upload_to_bucket(tokenized_path, HF_BUCKET_DATASET)
1303
+ log_success("Dataset tokenizado enviado ao Bucket Hugging Face!")
1304
+ training_logs.append("Dataset tokenizado enviado ao Bucket Hugging Face.")
1305
+ #----------------------------------------------------------------------------
1306
  if os.path.exists(tokenized_path):
1307
  log_info("Dataset tokenizado encontrado no disco. A carregar...")
1308
  tokenized_datasets = load_from_disk(tokenized_path)