skytnt commited on
Commit
9d365b6
1 Parent(s): 1bdd3b2

add examples

Browse files
Files changed (3) hide show
  1. app.py +3 -1
  2. examples/00.jpg +0 -0
  3. examples/01.jpg +0 -0
app.py CHANGED
@@ -22,5 +22,7 @@ def predict(img):
22
  if __name__ == "__main__":
23
  model_path = hf_hub_download(repo_id="skytnt/anime_quality", filename="classifier.onnx")
24
  model = rt.InferenceSession(model_path, providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
25
- app = gr.Interface(predict, gr.Image(label="input image"), gr.Label(label="result"),title="Best Anime or Not", allow_flagging="never")
 
 
26
  app.launch()
 
22
  if __name__ == "__main__":
23
  model_path = hf_hub_download(repo_id="skytnt/anime_quality", filename="classifier.onnx")
24
  model = rt.InferenceSession(model_path, providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
25
+ examples = [[f"examples/{x:02d}.jpg"] for x in range(0, 2)]
26
+ app = gr.Interface(predict, gr.Image(label="input image"), gr.Label(label="result"),title="Best Anime or Not",
27
+ allow_flagging="never", examples=examples)
28
  app.launch()
examples/00.jpg ADDED
examples/01.jpg ADDED