Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import requests
|
| 2 |
+
import pandas as pd
|
| 3 |
+
from io import BytesIO
|
| 4 |
+
|
| 5 |
+
url = "https://huggingface.co/buckets/Neon-tech/Dataset-arranger/resolve/image-shards/shard_000021.parquet?download=true"
|
| 6 |
+
|
| 7 |
+
# Download file
|
| 8 |
+
response = requests.get(url)
|
| 9 |
+
response.raise_for_status()
|
| 10 |
+
|
| 11 |
+
# Load into pandas
|
| 12 |
+
df = pd.read_parquet(BytesIO(response.content))
|
| 13 |
+
|
| 14 |
+
# Show basic info
|
| 15 |
+
print("Shape:", df.shape)
|
| 16 |
+
print("\nColumns:", df.columns)
|
| 17 |
+
|
| 18 |
+
# Print first rows
|
| 19 |
+
print("\nFirst 10 rows:")
|
| 20 |
+
print(df.head(10))
|
| 21 |
+
|
| 22 |
+
# If you REALLY want to list all rows (be careful)
|
| 23 |
+
# for i, row in df.iterrows():
|
| 24 |
+
# print(i, row.to_dict())
|