Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
•
0fbd8bd
1
Parent(s):
73257b7
Update app.py
Browse files
app.py
CHANGED
@@ -24,6 +24,9 @@ os.system('wget https://www.dropbox.com/s/1jug4wtevz1rol0/model.onnx')
|
|
24 |
|
25 |
|
26 |
torch.hub.download_url_to_file('https://cdn.pixabay.com/photo/2017/09/11/15/58/sunset-2739472_1280.jpg', 'sunset.jpg')
|
|
|
|
|
|
|
27 |
|
28 |
|
29 |
# Load ONNX model
|
@@ -71,7 +74,7 @@ def inference(img, img2):
|
|
71 |
title = "AppleNeuralHash"
|
72 |
description = "Gradio demo for Apple NeuralHash, a perceptual hashing method for images based on neural networks. It can tolerate image resize and compression. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
|
73 |
article = "<p style='text-align: center'><a href='https://www.apple.com/child-safety/pdf/CSAM_Detection_Technical_Summary.pdf'>CSAM Detection Technical Summary</a> | <a href='https://github.com/AsuharietYgvar/AppleNeuralHash2ONNX'>Github Repo</a></p>"
|
74 |
-
examples = [['sunset.jpg']]
|
75 |
|
76 |
gr.Interface(
|
77 |
inference,
|
|
|
24 |
|
25 |
|
26 |
torch.hub.download_url_to_file('https://cdn.pixabay.com/photo/2017/09/11/15/58/sunset-2739472_1280.jpg', 'sunset.jpg')
|
27 |
+
torch.hub.download_url_to_file('https://cdn.pixabay.com/photo/2021/02/10/22/13/lake-6003727_1280.jpg', 'lake.jpg')
|
28 |
+
|
29 |
+
|
30 |
|
31 |
|
32 |
# Load ONNX model
|
|
|
74 |
title = "AppleNeuralHash"
|
75 |
description = "Gradio demo for Apple NeuralHash, a perceptual hashing method for images based on neural networks. It can tolerate image resize and compression. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
|
76 |
article = "<p style='text-align: center'><a href='https://www.apple.com/child-safety/pdf/CSAM_Detection_Technical_Summary.pdf'>CSAM Detection Technical Summary</a> | <a href='https://github.com/AsuharietYgvar/AppleNeuralHash2ONNX'>Github Repo</a></p>"
|
77 |
+
examples = [['sunset.jpg','lake.jpg']]
|
78 |
|
79 |
gr.Interface(
|
80 |
inference,
|