Spaces:
Runtime error
Runtime error
Viihtorugo
commited on
Commit
·
fb3e6eb
1
Parent(s):
8436dd5
Add the files
Browse files- requirements.txt +4 -2
- train.py +1 -1
requirements.txt
CHANGED
|
@@ -1,2 +1,4 @@
|
|
| 1 |
-
transformers
|
| 2 |
-
|
|
|
|
|
|
|
|
|
| 1 |
+
transformers==4.29.0
|
| 2 |
+
datasets==2.10.0
|
| 3 |
+
torch==2.1.0
|
| 4 |
+
gradio==3.33.0
|
train.py
CHANGED
|
@@ -11,7 +11,7 @@ feature_extractor = ViTFeatureExtractor.from_pretrained("google/vit-base-patch16
|
|
| 11 |
|
| 12 |
# Preprocessamento
|
| 13 |
def preprocess_function(examples):
|
| 14 |
-
return feature_extractor(examples["
|
| 15 |
|
| 16 |
# Aplicando o preprocessamento ao dataset
|
| 17 |
dataset = dataset.map(preprocess_function, batched=True)
|
|
|
|
| 11 |
|
| 12 |
# Preprocessamento
|
| 13 |
def preprocess_function(examples):
|
| 14 |
+
return feature_extractor(examples["img"], return_tensors="pt")
|
| 15 |
|
| 16 |
# Aplicando o preprocessamento ao dataset
|
| 17 |
dataset = dataset.map(preprocess_function, batched=True)
|