shujianong commited on
Commit
19b0d07
1 Parent(s): 7bf65a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -12
app.py CHANGED
@@ -1,11 +1,5 @@
1
  # -*- coding: utf-8 -*-
2
- """gradio-ui-pokemon-card-authenticator.ipynb
3
-
4
- Automatically generated by Colaboratory.
5
-
6
- Original file is located at
7
- https://colab.research.google.com/drive/1PfMek8tf9Ztk5QCiorsFU3fMiUNQNnGn
8
-
9
  # Introduction #
10
 
11
  Thanks to Kaggle mini-courses on computer vision for getting me started on this.
@@ -60,18 +54,19 @@ def pkm_predict(image):
60
  """# Gradio Launch #"""
61
 
62
  image = gr.inputs.Image()
 
 
 
63
 
64
  iface= gr.Interface(
65
  fn=pkm_predict,
66
  inputs=image,
67
  outputs="text",
 
 
 
68
  )
69
 
70
  iface.launch()
71
 
72
- title="Pokemon Card Authenticator"
73
- description="Keras CNN trained on 373 genuine and counterfeit Pokemon Card images to classify Pokemon cards as real and fake based on the back graphics of the card. To use it, simply upload your image or click on one of the examples to load them. Please note that this classifier only works with the back graphics of Pokemon cards; the uploaded image needs to be landscape and the Pokemon card needs to be upright in the middle of the image with white background (See examples)."
74
-
75
- examples=[['00395.JPG'], ['00430.JPG']]
76
 
77
- gr.Interface(inference,gr.inputs.Image(type="filepath"),[gr.outputs.Image(type="file",label="TokenCut_attn"),gr.outputs.Image(type="file",label="TokenCut_predication")],title=title,description=description,examples=examples).launch(enable_queue=True)
 
1
  # -*- coding: utf-8 -*-
2
+ """
 
 
 
 
 
 
3
  # Introduction #
4
 
5
  Thanks to Kaggle mini-courses on computer vision for getting me started on this.
 
54
  """# Gradio Launch #"""
55
 
56
  image = gr.inputs.Image()
57
+ title="Pokemon Card Authenticator"
58
+ description="Keras CNN trained on 373 genuine and counterfeit Pokemon Card images to classify Pokemon cards as real and fake based on the back graphics of the card. To use it, simply upload your image or click on one of the examples to load them. Please note that this classifier only works with the back graphics of Pokemon cards; the uploaded image needs to be landscape and the Pokemon card needs to be upright in the middle of the image with white background (See examples)."
59
+ examples=[['00395.JPG'], ['00430.JPG']]
60
 
61
  iface= gr.Interface(
62
  fn=pkm_predict,
63
  inputs=image,
64
  outputs="text",
65
+ title=title,
66
+ description=description,
67
+ examples=examples
68
  )
69
 
70
  iface.launch()
71
 
 
 
 
 
72