Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,11 +7,11 @@ from PIL import Image
|
|
| 7 |
from transformers import ViTForImageClassification, AutoImageProcessor, AdamW, ViTImageProcessor, VisionEncoderDecoderModel, AutoTokenizer
|
| 8 |
from torch.utils.data import DataLoader, TensorDataset
|
| 9 |
|
| 10 |
-
model_path = '
|
| 11 |
train_pickle_path = 'train_data.pickle'
|
| 12 |
valid_pickle_path = 'valid_data.pickle'
|
| 13 |
image_directory = 'images'
|
| 14 |
-
test_image_path = '
|
| 15 |
num_epochs = 5 # Fine-tune the model
|
| 16 |
label_list = ["小白", "巧巧", "冏媽", "乖狗", "花捲", "超人", "黑胖", "橘子"]
|
| 17 |
label_dictionary = {"小白": 0, "巧巧": 1, "冏媽": 2, "乖狗": 3, "花捲": 4, "超人": 5, "黑胖": 6, "橘子": 7}
|
|
|
|
| 7 |
from transformers import ViTForImageClassification, AutoImageProcessor, AdamW, ViTImageProcessor, VisionEncoderDecoderModel, AutoTokenizer
|
| 8 |
from torch.utils.data import DataLoader, TensorDataset
|
| 9 |
|
| 10 |
+
model_path = '/home/user/app'
|
| 11 |
train_pickle_path = 'train_data.pickle'
|
| 12 |
valid_pickle_path = 'valid_data.pickle'
|
| 13 |
image_directory = 'images'
|
| 14 |
+
test_image_path = '/home/user/app/test.jpeg'
|
| 15 |
num_epochs = 5 # Fine-tune the model
|
| 16 |
label_list = ["小白", "巧巧", "冏媽", "乖狗", "花捲", "超人", "黑胖", "橘子"]
|
| 17 |
label_dictionary = {"小白": 0, "巧巧": 1, "冏媽": 2, "乖狗": 3, "花捲": 4, "超人": 5, "黑胖": 6, "橘子": 7}
|