Commit
·
35827c4
1
Parent(s):
2f16dd4
Update data/generate_fake_news.py
Browse filesFixed the file paths to correctly point to `tmp` folder as the original paths are read-only
- data/generate_fake_news.py +13 -3
data/generate_fake_news.py
CHANGED
|
@@ -3,10 +3,20 @@ import random
|
|
| 3 |
from pathlib import Path
|
| 4 |
import datetime
|
| 5 |
|
| 6 |
-
# Save location
|
| 7 |
-
BASE_DIR = Path(__file__).resolve().parent
|
| 8 |
# OUTPUT_PATH = BASE_DIR / "generated_fake.csv"
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
# Simple templates (can later be replaced with GPT calls)
|
| 12 |
SEED_TITLES = [
|
|
|
|
| 3 |
from pathlib import Path
|
| 4 |
import datetime
|
| 5 |
|
| 6 |
+
# # Save location
|
| 7 |
+
# BASE_DIR = Path(__file__).resolve().parent
|
| 8 |
# OUTPUT_PATH = BASE_DIR / "generated_fake.csv"
|
| 9 |
+
|
| 10 |
+
# Use /tmp for writable storage
|
| 11 |
+
BASE_DIR = Path("/tmp")
|
| 12 |
+
|
| 13 |
+
# Ensure data directory exists
|
| 14 |
+
DATA_DIR = BASE_DIR / "data"
|
| 15 |
+
DATA_DIR.mkdir(parents=True, exist_ok=True)
|
| 16 |
+
|
| 17 |
+
# Final output path
|
| 18 |
+
OUTPUT_PATH = DATA_DIR / "generated_fake.csv"
|
| 19 |
+
|
| 20 |
|
| 21 |
# Simple templates (can later be replaced with GPT calls)
|
| 22 |
SEED_TITLES = [
|