Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,7 +52,7 @@ def aiornot0(image):
|
|
| 52 |
def aiornot1(image):
|
| 53 |
labels = ["Real", "AI"]
|
| 54 |
mod=models[1]
|
| 55 |
-
feature_extractor1 = AutoFeatureExtractor.from_pretrained(
|
| 56 |
model1 = AutoModelForImageClassification.from_pretrained(mod)
|
| 57 |
input = feature_extractor1(image, return_tensors="pt")
|
| 58 |
with torch.no_grad():
|
|
@@ -76,7 +76,7 @@ def aiornot1(image):
|
|
| 76 |
def aiornot2(image):
|
| 77 |
labels = ["AI", "Real"]
|
| 78 |
mod=models[2]
|
| 79 |
-
feature_extractor2 = AutoFeatureExtractor.from_pretrained(
|
| 80 |
model2 = AutoModelForImageClassification.from_pretrained(mod)
|
| 81 |
input = feature_extractor2(image, return_tensors="pt")
|
| 82 |
with torch.no_grad():
|
|
@@ -101,7 +101,7 @@ def aiornot2(image):
|
|
| 101 |
def aiornot3(image):
|
| 102 |
labels = ["Real", "AI"]
|
| 103 |
mod=models[3]
|
| 104 |
-
feature_extractor3 = AutoFeatureExtractor.from_pretrained(
|
| 105 |
model3 = AutoModelForImageClassification.from_pretrained(mod)
|
| 106 |
input = feature_extractor3(image, return_tensors="pt")
|
| 107 |
with torch.no_grad():
|
|
|
|
| 52 |
def aiornot1(image):
|
| 53 |
labels = ["Real", "AI"]
|
| 54 |
mod=models[1]
|
| 55 |
+
feature_extractor1 = AutoFeatureExtractor.from_pretrained(mod)
|
| 56 |
model1 = AutoModelForImageClassification.from_pretrained(mod)
|
| 57 |
input = feature_extractor1(image, return_tensors="pt")
|
| 58 |
with torch.no_grad():
|
|
|
|
| 76 |
def aiornot2(image):
|
| 77 |
labels = ["AI", "Real"]
|
| 78 |
mod=models[2]
|
| 79 |
+
feature_extractor2 = AutoFeatureExtractor.from_pretrained(mod)
|
| 80 |
model2 = AutoModelForImageClassification.from_pretrained(mod)
|
| 81 |
input = feature_extractor2(image, return_tensors="pt")
|
| 82 |
with torch.no_grad():
|
|
|
|
| 101 |
def aiornot3(image):
|
| 102 |
labels = ["Real", "AI"]
|
| 103 |
mod=models[3]
|
| 104 |
+
feature_extractor3 = AutoFeatureExtractor.from_pretrained(mod)
|
| 105 |
model3 = AutoModelForImageClassification.from_pretrained(mod)
|
| 106 |
input = feature_extractor3(image, return_tensors="pt")
|
| 107 |
with torch.no_grad():
|