Spaces:
Sleeping
Sleeping
change files
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ def preprocess_image(image):
|
|
33 |
# Prediction function
|
34 |
def predict(image):
|
35 |
# Load the input file
|
36 |
-
reloaded_img_tensor = torch.load(image).to(
|
37 |
|
38 |
# Make predictions
|
39 |
output = model(reloaded_img_tensor)
|
@@ -47,7 +47,7 @@ iface = gr.Interface(
|
|
47 |
inputs=gr.File(label="Upload a .pt file"), # Input: .pt file upload
|
48 |
outputs=gr.Textbox(label="Predicted Class"), # Output: Text showing predicted class
|
49 |
title="Vault Challenge 3 - CW", # Title of the interface
|
50 |
-
description="Upload an image, and the model will predict the class. Try to fool the model into predicting the FLAG using C&W!"
|
51 |
)
|
52 |
|
53 |
# Launch the Gradio interface
|
|
|
33 |
# Prediction function
|
34 |
def predict(image):
|
35 |
# Load the input file
|
36 |
+
reloaded_img_tensor = torch.load(image).to(device)
|
37 |
|
38 |
# Make predictions
|
39 |
output = model(reloaded_img_tensor)
|
|
|
47 |
inputs=gr.File(label="Upload a .pt file"), # Input: .pt file upload
|
48 |
outputs=gr.Textbox(label="Predicted Class"), # Output: Text showing predicted class
|
49 |
title="Vault Challenge 3 - CW", # Title of the interface
|
50 |
+
description="Upload an image, and the model will predict the class. Try to fool the model into predicting the FLAG using C&W! Note: you should save the adverserial image as a .pt file and upload it to the model to get the FLAG."
|
51 |
)
|
52 |
|
53 |
# Launch the Gradio interface
|