Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ def aiornot(img,mod_choose):
|
|
| 15 |
|
| 16 |
#feature_extractor = AutoFeatureExtractor.from_pretrained("microsoft/resnet-50")
|
| 17 |
mod=models[int(mod_choose)]
|
| 18 |
-
feature_extractor = AutoFeatureExtractor.from_pretrained(
|
| 19 |
model = AutoModelForImageClassification.from_pretrained("Nahrawy/AIorNot")
|
| 20 |
|
| 21 |
input = feature_extractor(image, return_tensors="pt")
|
|
@@ -29,7 +29,7 @@ def aiornot(img,mod_choose):
|
|
| 29 |
with gr.Blocks() as app:
|
| 30 |
with gr.Row():
|
| 31 |
with gr.Column():
|
| 32 |
-
inp = gr.Image()
|
| 33 |
mod_choose=gr.Number(value=0)
|
| 34 |
btn = gr.Button()
|
| 35 |
outp = gr.Textbox()
|
|
|
|
| 15 |
|
| 16 |
#feature_extractor = AutoFeatureExtractor.from_pretrained("microsoft/resnet-50")
|
| 17 |
mod=models[int(mod_choose)]
|
| 18 |
+
feature_extractor = AutoFeatureExtractor.from_pretrained("Nahrawy/AIorNot")
|
| 19 |
model = AutoModelForImageClassification.from_pretrained("Nahrawy/AIorNot")
|
| 20 |
|
| 21 |
input = feature_extractor(image, return_tensors="pt")
|
|
|
|
| 29 |
with gr.Blocks() as app:
|
| 30 |
with gr.Row():
|
| 31 |
with gr.Column():
|
| 32 |
+
inp = gr.Image(type='filepath')
|
| 33 |
mod_choose=gr.Number(value=0)
|
| 34 |
btn = gr.Button()
|
| 35 |
outp = gr.Textbox()
|