Updated from colab
Browse files- app.py +1 -2
- requirements.txt +1 -1
app.py
CHANGED
@@ -1,10 +1,9 @@
|
|
1 |
from datasets import load_dataset
|
2 |
from transformers import AutoFeatureExtractor, AutoModelForImageClassification
|
3 |
-
import torch
|
4 |
|
5 |
# This should be the same as the first line of Python code in this Colab notebook
|
6 |
dataset = load_dataset('beans')
|
7 |
-
|
8 |
model = AutoModelForImageClassification.from_pretrained("saved_model_files")
|
9 |
|
10 |
labels = dataset['train'].features['labels'].names
|
|
|
1 |
from datasets import load_dataset
|
2 |
from transformers import AutoFeatureExtractor, AutoModelForImageClassification
|
|
|
3 |
|
4 |
# This should be the same as the first line of Python code in this Colab notebook
|
5 |
dataset = load_dataset('beans')
|
6 |
+
extractor = AutoFeatureExtractor.from_pretrained("saved_model_files")
|
7 |
model = AutoModelForImageClassification.from_pretrained("saved_model_files")
|
8 |
|
9 |
labels = dataset['train'].features['labels'].names
|
requirements.txt
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
torch
|
2 |
-
transformers
|
|
|
1 |
torch
|
2 |
+
transformers
|