Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -3,8 +3,9 @@ import gradio as gr
|
|
3 |
import random
|
4 |
import time
|
5 |
from datasets import load_dataset, Dataset
|
6 |
-
from PIL import PngImagePlugin
|
7 |
-
|
|
|
8 |
"""
|
9 |
This code is designed to read in the ImageNet 1K ILSVRC dataset from the Hugging Face Hub,
|
10 |
then create a new version of this dataset with {percentage} lines with random labels between 0-9,
|
|
|
3 |
import random
|
4 |
import time
|
5 |
from datasets import load_dataset, Dataset
|
6 |
+
from PIL import PngImagePlugin, ImageFile
|
7 |
+
ImageFile.LOAD_TRUNCATED_IMAGES = True
|
8 |
+
PngImagePlugin.MAX_TEXT_CHUNK = 1048576 * 10 # this is 10x the amount.
|
9 |
"""
|
10 |
This code is designed to read in the ImageNet 1K ILSVRC dataset from the Hugging Face Hub,
|
11 |
then create a new version of this dataset with {percentage} lines with random labels between 0-9,
|