Skip to content

Commit 92b6ad8

Browse files
authored
Minor fixes in pandas docs (#1567)
* minor fixes * again
1 parent 16b20c9 commit 92b6ad8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/hub/datasets-pandas.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ for image_path in (folder_path + df["file_name"]):
9090
...
9191
```
9292

93-
Since the dataset is in a supported structure (a `metadata.csv` file with a `file_name` field), you can save this dataset to Hugging Face and the Dataset Viewer shows both the metadata and images on Hugging Face.
93+
Since the dataset is in a [supported structure](https://huggingface.co/docs/hub/en/datasets-image#additional-columns) (a `metadata.csv` or `.jsonl` file with a `file_name` field), you can save this dataset to Hugging Face and the Dataset Viewer shows both the metadata and images on Hugging Face.
9494

9595
```python
9696
from huggingface_hub import HfApi
@@ -148,7 +148,7 @@ for audio_path in (folder_path + df["file_name"]):
148148
...
149149
```
150150

151-
Since the dataset is in a supported structure (a `metadata.csv` file with a `file_name` field), you can save it to Hugging Face, and the Hub Dataset Viewer shows both the metadata and audio.
151+
Since the dataset is in a [supported structure](https://huggingface.co/docs/hub/en/datasets-audio#additional-columns) (a `metadata.csv` or `.jsonl` file with a `file_name` field), you can save it to Hugging Face, and the Hub Dataset Viewer shows both the metadata and audio.
152152

153153
```python
154154
from huggingface_hub import HfApi
@@ -213,7 +213,9 @@ df[["label", "score"]] = [(y["label"], y["score"]) for y in pipe(x for x in tqdm
213213
from transformers import pipeline
214214
from tqdm import tqdm
215215

216-
p = pipeline("text-generation", model="Qwen/Qwen2.5-1.5B-Instruct")
216+
pipe = pipeline("text-generation", model="Qwen/Qwen2.5-1.5B-Instruct")
217+
218+
# Generate chat response
217219
prompt = "What is the main topic of this sentence ? REPLY IN LESS THAN 3 WORDS. Sentence: '{}'"
218220
df["output"] = [y["generated_text"][1]["content"] for y in pipe([{"role": "user", "content": prompt.format(x)}] for x in tqdm(df["text"]))]
219221
```

0 commit comments

Comments
 (0)