Spaces:
Running
on
Zero
Running
on
Zero
fix with concatenate_datasets
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ from transformers import pipeline, AutoModelForSeq2SeqLM, AutoTokenizer
|
|
3 |
import os
|
4 |
import torch
|
5 |
import spaces
|
6 |
-
from datasets import Dataset, load_dataset
|
7 |
import time
|
8 |
import datetime
|
9 |
|
@@ -88,7 +88,7 @@ def push_to_hf_dataset():
|
|
88 |
print(f"[INFO] Loaded existing dataset with {len(existing_dataset)} entries")
|
89 |
|
90 |
# Concatenate existing data with new data
|
91 |
-
combined_dataset = existing_dataset
|
92 |
print(f"[INFO] Combined dataset now has {len(combined_dataset)} entries")
|
93 |
except Exception as e:
|
94 |
print(f"[INFO] No existing dataset found or error loading: {str(e)}")
|
|
|
3 |
import os
|
4 |
import torch
|
5 |
import spaces
|
6 |
+
from datasets import Dataset, load_dataset, concatenate_datasets
|
7 |
import time
|
8 |
import datetime
|
9 |
|
|
|
88 |
print(f"[INFO] Loaded existing dataset with {len(existing_dataset)} entries")
|
89 |
|
90 |
# Concatenate existing data with new data
|
91 |
+
combined_dataset = concatenate_datasets(existing_dataset, new_data)
|
92 |
print(f"[INFO] Combined dataset now has {len(combined_dataset)} entries")
|
93 |
except Exception as e:
|
94 |
print(f"[INFO] No existing dataset found or error loading: {str(e)}")
|