DisgustingOzil commited on
Commit
50aa10b
1 Parent(s): 2f05017

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +30 -0
README.md CHANGED
@@ -18,5 +18,35 @@ configs:
18
  path: data/train-*
19
  ---
20
  # Dataset Card for "Pak_Law_QA"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
  [More Information needed](https://github.com/huggingface/datasets/blob/main/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
 
18
  path: data/train-*
19
  ---
20
  # Dataset Card for "Pak_Law_QA"
21
+ ```python
22
+
23
+ from huggingface_hub import login
24
+
25
+ login()
26
+ from datasets import load_dataset
27
+ import os
28
+
29
+ # dataset = load_dataset("imagefolder", data_dir="/home/musab/Downloads/ROBIN/Dataset_3rooms/", split="train")
30
+ # from datasets import load_dataset
31
+
32
+ # Load dataset
33
+ data_dir = "/home/musab/Downloads/ROBIN/Dataset_3rooms/"
34
+ dataset = load_dataset("imagefolder", data_dir=data_dir, split="train")
35
+
36
+ # Define a function that will be applied to each item
37
+ def add_new_column(example):
38
+ # Add a new key-value pair for the new column
39
+ example["en_text"] = "Create 3 room 2d floor plan"
40
+ return example
41
+
42
+ # Use the map function to apply the function to each item in the dataset
43
+ dataset = dataset.map(add_new_column)
44
+
45
+ # To verify that the new column has been added
46
+ print(dataset.column_names)
47
+
48
+ dataset.push_to_hub("DisgustingOzil/Pak_Law_QA", token=os.environ.get('HF_TOKEN'))
49
+
50
+ ```
51
 
52
  [More Information needed](https://github.com/huggingface/datasets/blob/main/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)