acidtib commited on
Commit
f16dddc
1 Parent(s): 41d92c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -9,13 +9,15 @@ sample_img_paths = [str(p) for p in Path('./samples').glob('*.png')]
9
  def predict(input_img):
10
  predictions = pipeline(input_img)
11
  return input_img, {p["label"]: p["score"] for p in predictions}
 
12
  gradio_app = gr.Interface(
13
  predict,
14
- inputs=gr.inputs.Image(label="Select Magic Card", type="pil"),
15
  outputs=gr.Label(label="Result", num_top_classes=2),
16
  examples=sample_img_paths,
17
  title="TCG Magic Classifier",
18
  description='This classifier returns the id of cards from scryfall!, try one of the samples below'
19
  )
20
 
21
- if __name__ == "__main__":
 
 
9
  def predict(input_img):
10
  predictions = pipeline(input_img)
11
  return input_img, {p["label"]: p["score"] for p in predictions}
12
+
13
  gradio_app = gr.Interface(
14
  predict,
15
+ inputs=gr.Image(label="Select Magic Card", type="pil"),
16
  outputs=gr.Label(label="Result", num_top_classes=2),
17
  examples=sample_img_paths,
18
  title="TCG Magic Classifier",
19
  description='This classifier returns the id of cards from scryfall!, try one of the samples below'
20
  )
21
 
22
+ if __name__ == "__main__":
23
+ gradio_app.launch()