Ahsen Khaliq commited on
Commit
059489a
1 Parent(s): 8a0b9c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -29,6 +29,8 @@ torch.hub.download_url_to_file('https://i.imgur.com/ka5s8K7.png', 'rotate.png')
29
  torch.hub.download_url_to_file('https://user-images.githubusercontent.com/1328/129860794-e7eb0132-d929-4c9d-b92e-4e4faba9e849.png', 'dog.png')
30
  torch.hub.download_url_to_file('https://user-images.githubusercontent.com/1328/129860810-f414259a-3253-43e3-9e8e-a0ef78372233.png', 'same.png')
31
 
 
 
32
 
33
 
34
 
@@ -83,7 +85,7 @@ def inference(img, img2):
83
  title = "AppleNeuralHash"
84
  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."
85
  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> | <a href='https://github.com/AsuharietYgvar/AppleNeuralHash2ONNX/issues/1'>Working Collision example images from github issue</a></p> "
86
- examples = [['sunset.jpg','rotate.png'],['dog.png','same.png']]
87
 
88
  gr.Interface(
89
  inference,
@@ -92,5 +94,6 @@ gr.Interface(
92
  title=title,
93
  description=description,
94
  article=article,
95
- examples=examples
 
96
  ).launch(debug=True)
 
29
  torch.hub.download_url_to_file('https://user-images.githubusercontent.com/1328/129860794-e7eb0132-d929-4c9d-b92e-4e4faba9e849.png', 'dog.png')
30
  torch.hub.download_url_to_file('https://user-images.githubusercontent.com/1328/129860810-f414259a-3253-43e3-9e8e-a0ef78372233.png', 'same.png')
31
 
32
+ torch.hub.download_url_to_file('https://cdn.pixabay.com/photo/2021/08/23/17/53/cat-6568422_1280.jpg', 'cat1.jpg')
33
+ torch.hub.download_url_to_file('https://i.imgur.com/fMoVhSz.png', 'cat2.png')
34
 
35
 
36
 
 
85
  title = "AppleNeuralHash"
86
  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."
87
  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> | <a href='https://github.com/AsuharietYgvar/AppleNeuralHash2ONNX/issues/1'>Working Collision example images from github issue</a></p> "
88
+ examples = [['sunset.jpg','rotate.png'],['dog.png','same.png'],['cat1.jpg','cat2.png']]
89
 
90
  gr.Interface(
91
  inference,
 
94
  title=title,
95
  description=description,
96
  article=article,
97
+ examples=examples,
98
+ allow_flagging=False
99
  ).launch(debug=True)