Update app.py
Browse files
app.py
CHANGED
|
@@ -122,7 +122,8 @@ def aiornot1(image):
|
|
| 122 |
def aiornot2(image):
|
| 123 |
labels = ["Real", "AI"]
|
| 124 |
mod=models[2]
|
| 125 |
-
feature_extractor2 = AutoFeatureExtractor.from_pretrained(
|
|
|
|
| 126 |
model2 = AutoModelForImageClassification.from_pretrained(mod)
|
| 127 |
input = feature_extractor2(image, return_tensors="pt")
|
| 128 |
with torch.no_grad():
|
|
|
|
| 122 |
def aiornot2(image):
|
| 123 |
labels = ["Real", "AI"]
|
| 124 |
mod=models[2]
|
| 125 |
+
feature_extractor2 = AutoFeatureExtractor.from_pretrained(mod)
|
| 126 |
+
#feature_extractor2 = AutoFeatureExtractor.from_pretrained("microsoft/resnet-50")
|
| 127 |
model2 = AutoModelForImageClassification.from_pretrained(mod)
|
| 128 |
input = feature_extractor2(image, return_tensors="pt")
|
| 129 |
with torch.no_grad():
|