fariasultana commited on
Commit
b30de99
·
verified ·
1 Parent(s): e4b4d6a

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - bn
4
+ - en
5
+ license: mit
6
+ task_categories:
7
+ - text-generation
8
+ - summarization
9
+ - question-answering
10
+ tags:
11
+ - trickbd
12
+ - trickgpt
13
+ - bengali
14
+ - tech-forum
15
+ - data-filtering
16
+ - high-quality
17
+ - llm
18
+ - pretraining
19
+ - math
20
+ - data-synthesis
21
+ dataset_info:
22
+ modalities:
23
+ - text
24
+ formats:
25
+ - jsonl
26
+ - parquet
27
+ features:
28
+ - name: instruction
29
+ dtype: string
30
+ - name: input
31
+ dtype: string
32
+ - name: output
33
+ dtype: string
34
+ - name: metadata
35
+ struct:
36
+ - name: title
37
+ dtype: string
38
+ - name: category
39
+ dtype: string
40
+ - name: url
41
+ dtype: string
42
+ - name: source
43
+ dtype: string
44
+ ---
45
+
46
+ # TrickGPT Dataset
47
+
48
+ ![TrickGPT Logo](trickgpt_logo.png)
49
+
50
+ ## About TrickGPT
51
+ TrickGPT is a specialized dataset curated from [TrickBD](https://trickbd.com), Bangladesh's premier mobile-based tech forum and community. This dataset is designed to train State-of-the-Art (SOTA) AI models to understand, summarize, and generate tech-related content in both Bengali and English, specifically tailored to the unique community-driven knowledge shared on TrickBD.
52
+
53
+ ## Data Description
54
+ The dataset consists of articles scraped from TrickBD, formatted in an instruction-following style (Instruction, Input, Output). This format is ideal for fine-tuning Large Language Models (LLMs) like Llama, Mistral, or GPT-based architectures.
55
+
56
+ ### Dataset Structure
57
+ Each entry in the dataset contains:
58
+ - **instruction**: A prompt describing the task (e.g., "Summarize this article").
59
+ - **input**: The raw content of the TrickBD article.
60
+ - **output**: (Placeholder for model-generated or human-refined summaries).
61
+ - **metadata**: Additional information including the original title, category, and URL.
62
+
63
+ ## Usage for SOTA AI Training
64
+ To use this dataset for training, you can load it using the Hugging Face `datasets` library:
65
+
66
+ ```python
67
+ from datasets import load_dataset
68
+
69
+ dataset = load_dataset("fariasultana/TrickGPT")
70
+ ```
71
+
72
+ ### Formatting for Fine-tuning
73
+ The data is provided in `.jsonl` format, which can be directly used with popular fine-tuning frameworks like Axolotl, Unsloth, or Hugging Face's SFTTrainer.
74
+
75
+ ## Automation
76
+ The dataset is designed to be updated automatically using a Playwright-based scraper that tracks new posts on TrickBD.
77
+
78
+ ## License
79
+ This dataset is released under the MIT License. Please respect the original content creators on TrickBD.
automate_scraping.sh ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # TrickGPT Automated Scraping Script
4
+ # This script runs the scraper and prepares the data for upload
5
+
6
+ echo "Starting TrickGPT scraping process..."
7
+
8
+ # Run the scraper
9
+ python3 scraper.py
10
+
11
+ # Check if scraping was successful
12
+ if [ -f "trickgpt_dataset.jsonl" ]; then
13
+ echo "Scraping successful. Updating dataset.jsonl..."
14
+ mv trickgpt_dataset.jsonl dataset.jsonl
15
+
16
+ # Instructions for uploading to Hugging Face
17
+ # hf upload fariasultana/TrickGPT . --repo-type=dataset
18
+ echo "Dataset updated. Ready for upload to fariasultana/TrickGPT."
19
+ else
20
+ echo "Scraping failed. Please check scraper.py and internet connection."
21
+ exit 1
22
+ fi
dataset.jsonl ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {"instruction": "Summarize the key points of the following article from TrickBD titled '🔥 Evolution X 16.0: Redmi Note 11 (Spes)-এ Android 16 ইনস্টল করুন এবং সেরা পারফরম্যান্স পান!'.", "input": "​🛠️ POCO F6 Pro (Vermeer) এ TWRP ইনস্টল করুন। আনঅফিশিয়াল রিকভারি গাইড!", "output": "", "metadata": {"title": "🔥 Evolution X 16.0: Redmi Note 11 (Spes)-এ Android 16 ইনস্টল করুন এবং সেরা পারফরম্যান্স পান!", "category": "Uncategorized", "url": "https://trickbd.com/custom-rom/3073152", "source": "trickbd.com"}}
2
+ {"instruction": "Summarize the key points of the following article from TrickBD titled 'Make your linux super fast with these tweaks'.", "input": "​🛠️ POCO F6 Pro (Vermeer) এ TWRP ইনস্টল করুন। আনঅফিশিয়াল রিকভারি গাইড!", "output": "", "metadata": {"title": "Make your linux super fast with these tweaks", "category": "Uncategorized", "url": "https://trickbd.com/cybersecurity-tutorials/3078735", "source": "trickbd.com"}}
3
+ {"instruction": "Summarize the key points of the following article from TrickBD titled 'সাইকোলজিক্যাল ডিজঅর্ডার : মানব মনের যতোসব অদ্ভুত অসুখ'.", "input": "​🛠️ POCO F6 Pro (Vermeer) এ TWRP ইনস্টল করুন। আনঅফিশিয়াল রিকভারি গাইড!", "output": "", "metadata": {"title": "সাইকোলজিক্যাল ডিজঅর্ডার : মানব মনের যতোসব অদ্ভুত অসুখ", "category": "Uncategorized", "url": "https://trickbd.com/lifestyle/3078762", "source": "trickbd.com"}}
4
+ {"instruction": "Summarize the key points of the following article from TrickBD titled 'GitHub সুপার সার্চ ইঞ্জিন মডিউল'.", "input": "​🛠️ POCO F6 Pro (Vermeer) এ TWRP ইনস্টল করুন। আনঅফিশিয়াল রিকভারি গাইড!", "output": "", "metadata": {"title": "GitHub সুপার সার্চ ইঞ্জিন মডিউল", "category": "Uncategorized", "url": "https://trickbd.com/tools/3077582", "source": "trickbd.com"}}
5
+ {"instruction": "Summarize the key points of the following article from TrickBD titled 'Pixellab এর জন্য একসাথে 50+ বাংলা ফন্ট'.", "input": "​🛠️ POCO F6 Pro (Vermeer) এ TWRP ইনস্টল করুন। আনঅফিশিয়াল রিকভারি গাইড!", "output": "", "metadata": {"title": "Pixellab এর জন্য একসাথে 50+ বাংলা ফন্ট", "category": "Uncategorized", "url": "https://trickbd.com/tools/3078646", "source": "trickbd.com"}}
6
+ {"instruction": "Summarize the key points of the following article from TrickBD titled '🖥️💥 Microsoft Word-এ Page Number দেওয়ার নিয়ম – Step-by-Step Complete Guide 📝📐'.", "input": "​🛠️ POCO F6 Pro (Vermeer) এ TWRP ইনস্টল করুন। আনঅফিশিয়াল রিকভারি গাইড!", "output": "", "metadata": {"title": "🖥️💥 Microsoft Word-এ Page Number দেওয়ার নিয়ম – Step-by-Step Complete Guide 📝📐", "category": "Uncategorized", "url": "https://trickbd.com/windows-pc/3078505", "source": "trickbd.com"}}
7
+ {"instruction": "Summarize the key points of the following article from TrickBD titled 'AI এর মাধ্যমে Cyber Attack টেকনিক'.", "input": "​🛠️ POCO F6 Pro (Vermeer) এ TWRP ইনস্টল করুন। আনঅফিশিয়াল রিকভারি গাইড!", "output": "", "metadata": {"title": "AI এর মাধ্যমে Cyber Attack টেকনিক", "category": "Uncategorized", "url": "https://trickbd.com/cybersecurity-tutorials/3078559", "source": "trickbd.com"}}
8
+ {"instruction": "Summarize the key points of the following article from TrickBD titled 'রাজশাহী বিশ্ববিদ্যালয়ের এ ইউনিট লিখিত ও ব্যবহারিক পরীক্ষার ফল প্রকাশ – জানুন বিস্তারিত'.", "input": "​🛠️ POCO F6 Pro (Vermeer) এ TWRP ইনস্টল করুন। আনঅফিশিয়াল রিকভারি গাইড!", "output": "", "metadata": {"title": "রাজশাহী বিশ্ববিদ্যালয়ের এ ইউনিট লিখিত ও ব্যবহারিক পরীক্ষার ফল প্রকাশ – জানুন বিস্তারিত", "category": "Uncategorized", "url": "https://trickbd.com/electronics/3079259", "source": "trickbd.com"}}
9
+ {"instruction": "Summarize the key points of the following article from TrickBD titled 'প্রোগ্রামিং ল্যাঙ্গুয়েজ শেখার রোডম্যাপ'.", "input": "​🛠️ POCO F6 Pro (Vermeer) এ TWRP ইনস্টল করুন। আনঅফিশিয়াল রিকভারি গাইড!", "output": "", "metadata": {"title": "প্রোগ্রামিং ল্যাঙ্গুয়েজ শেখার রোডম্যাপ", "category": "Uncategorized", "url": "https://trickbd.com/education/3063989", "source": "trickbd.com"}}
10
+ {"instruction": "Summarize the key points of the following article from TrickBD titled '[Hot Post] Airtel & Robi ফ্রী ইন্টারনেট চালু হয়েছে সকলের সিমই চলবে সারাদেশে'.", "input": "​🛠️ POCO F6 Pro (Vermeer) এ TWRP ইনস্টল করুন। আনঅফিশিয়াল রিকভারি গাইড!", "output": "", "metadata": {"title": "[Hot Post] Airtel & Robi ফ্রী ইন্টারনেট চালু হয়েছে সকলের সিমই চলবে সারাদেশে", "category": "Uncategorized", "url": "https://trickbd.com/airtel-free-net/3065439", "source": "trickbd.com"}}
11
+ {"instruction": "Summarize the key points of the following article from TrickBD titled 'ESP32 হতে Flipper Zero তৈরী করুন'.", "input": "​🛠️ POCO F6 Pro (Vermeer) এ TWRP ইনস্টল করুন। আনঅফিশিয়াল রিকভারি গাইড!", "output": "", "metadata": {"title": "ESP32 হতে Flipper Zero তৈরী করুন", "category": "Uncategorized", "url": "https://trickbd.com/cybersecurity-tutorials/3078890", "source": "trickbd.com"}}
12
+ {"instruction": "Summarize the key points of the following article from TrickBD titled 'রিয়েল লাইফ হ্যাকিং : হ্যাকিং করে টাকা ইনকাম?!'.", "input": "​🛠️ POCO F6 Pro (Vermeer) এ TWRP ইনস্টল করুন। আনঅফিশিয়াল রিকভারি গাইড!", "output": "", "metadata": {"title": "রিয়েল লাইফ হ্যাকিং : হ্যাকিং করে টাকা ইনকাম?!", "category": "Uncategorized", "url": "https://trickbd.com/cybersecurity-tutorials/3078518", "source": "trickbd.com"}}
13
+ {"instruction": "Summarize the key points of the following article from TrickBD titled 'BIN কী? যেকোনো ওয়েবসাইটের ফ্রি ট্রায়ালের BIN বের করার উপায়'.", "input": "​🛠️ POCO F6 Pro (Vermeer) এ TWRP ইনস্টল করুন। আনঅফিশিয়াল রিকভারি গাইড!", "output": "", "metadata": {"title": "BIN কী? যেকোনো ওয়েবসাইটের ফ্রি ট্রায়ালের BIN বের করার উপায়", "category": "Uncategorized", "url": "https://trickbd.com/uncategorized/3078711", "source": "trickbd.com"}}
14
+ {"instruction": "Summarize the key points of the following article from TrickBD titled 'TrickBD+ এবং কিছুকথা…'.", "input": "​🛠️ POCO F6 Pro (Vermeer) এ TWRP ইনস্টল করুন। আনঅফিশিয়াল রিকভারি গাইড!", "output": "", "metadata": {"title": "TrickBD+ এবং কিছুকথা…", "category": "Uncategorized", "url": "https://trickbd.com/tricks/3078682", "source": "trickbd.com"}}
15
+ {"instruction": "Summarize the key points of the following article from TrickBD titled '​🚀 Redmi Note 11-এ OrangeFox Recovery ইনস্টল: কাস্টম রম ও রুটিংয়ের জন্য পারফেক্ট গাইড'.", "input": "​🛠️ POCO F6 Pro (Vermeer) এ TWRP ইনস্টল করুন। আনঅফিশিয়াল রিকভারি গাইড!", "output": "", "metadata": {"title": "​🚀 Redmi Note 11-এ OrangeFox Recovery ইনস্টল: কাস্টম রম ও রুটিংয়ের জন্য পারফেক্ট গাইড", "category": "Uncategorized", "url": "https://trickbd.com/custom-rom/3072942", "source": "trickbd.com"}}
scraper.py ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import asyncio
2
+ import json
3
+ from playwright.async_api import async_playwright
4
+
5
+ async def scrape_trickbd():
6
+ """
7
+ Scrapes articles from trickbd.com, formats them into a dataset for AI model training,
8
+ and saves the data to a JSONL file.
9
+ """
10
+ async with async_playwright() as p:
11
+ browser = await p.chromium.launch(headless=True)
12
+ page = await browser.new_page()
13
+
14
+ # Navigate to the website with a desktop theme
15
+ base_url = "https://trickbd.com/?theme_change=desktop"
16
+ try:
17
+ await page.goto(base_url, timeout=120000) # Increased timeout
18
+ except Exception as e:
19
+ print(f"Failed to load the main page: {e}")
20
+ await browser.close()
21
+ return
22
+
23
+ # Extract unique article links from the homepage
24
+ links = await page.eval_on_selector_all("h3 a", "elements => elements.map(e => e.href)")
25
+ unique_links = list(set([link for link in links if "/author/" not in link and "/category/" not in link]))
26
+ print(f"Found {len(unique_links)} unique article links.")
27
+
28
+ articles = []
29
+ # Scrape a limited number of articles for the dataset sample
30
+ for link in unique_links[:15]:
31
+ try:
32
+ print(f"Navigating to: {link}")
33
+ await page.goto(link, timeout=120000) # Increased timeout
34
+ await page.wait_for_load_state("domcontentloaded", timeout=60000)
35
+
36
+ # Extract title, content, and category using robust selectors
37
+ title = await page.evaluate("() => document.querySelector('h1')?.innerText || document.title")
38
+ content = await page.evaluate("""() => {
39
+ const selectors = ['.entry-content', '.post-content', 'article'];
40
+ for (const s of selectors) {
41
+ const el = document.querySelector(s);
42
+ if (el) return el.innerText;
43
+ }
44
+ return "";
45
+ }""")
46
+ category = await page.evaluate("() => document.querySelector('.cat-links')?.innerText || 'Uncategorized'")
47
+
48
+ if content:
49
+ articles.append({
50
+ "instruction": f"Summarize the key points of the following article from TrickBD titled '{title}'.",
51
+ "input": content.strip(),
52
+ "output": "", # To be filled by the model
53
+ "metadata": {
54
+ "title": title,
55
+ "category": category,
56
+ "url": link,
57
+ "source": "trickbd.com"
58
+ }
59
+ })
60
+ print(f"Successfully scraped: {title[:60]}...")
61
+ else:
62
+ print(f"Could not extract content from: {link}")
63
+
64
+ except Exception as e:
65
+ print(f"Error scraping {link}: {e}")
66
+
67
+ await browser.close()
68
+
69
+ # Save the scraped data to a JSONL file
70
+ output_file = "/home/ubuntu/trickgpt_dataset.jsonl"
71
+ with open(output_file, "w", encoding="utf-8") as f:
72
+ for article in articles:
73
+ f.write(json.dumps(article, ensure_ascii=False) + "\n")
74
+
75
+ print(f"Scraping completed. Saved {len(articles)} articles to {output_file}")
76
+
77
+ if __name__ == "__main__":
78
+ asyncio.run(scrape_trickbd())
trickbd_logo_reference.png ADDED

Git LFS Details

  • SHA256: f6ddea66bcd527e6af6b74f1b28b2abf97c3e24a1b200006b75df6859bf5c81a
  • Pointer size: 130 Bytes
  • Size of remote file: 17.4 kB
trickbd_logo_reference.webp ADDED

Git LFS Details

  • SHA256: 874998479c1d57cab599a76c66f59cb5b824427853ab6c988bae1d2d6a6b4d8e
  • Pointer size: 130 Bytes
  • Size of remote file: 10.4 kB
trickgpt_logo.png ADDED

Git LFS Details

  • SHA256: 3fe1bd71f86c03f274d70c3b32c275d2d920384c6f1484079bf06aff30b48bf0
  • Pointer size: 131 Bytes
  • Size of remote file: 639 kB