Joodson commited on
Commit
73ace6e
·
verified ·
1 Parent(s): a446f94

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -30,10 +30,10 @@ def predict(image: Image.Image):
30
  predicted = torch.argmax(logits, dim=1).item()
31
  return config.id2label[str(predicted)]
32
 
33
- # Use only gr.Interface
34
  gr.Interface(
35
  fn=predict,
36
  inputs=gr.Image(type="pil"),
37
  outputs=gr.Label(),
38
- allow_flagging="never"
39
- ).launch(share=True, enable_queue=True) # << allows API + UI
 
30
  predicted = torch.argmax(logits, dim=1).item()
31
  return config.id2label[str(predicted)]
32
 
33
+ # Prediction interface
34
  gr.Interface(
35
  fn=predict,
36
  inputs=gr.Image(type="pil"),
37
  outputs=gr.Label(),
38
+ flagging_mode="never"
39
+ ).queue().launch(share=True)