devdata commited on
Commit
409a942
·
1 Parent(s): e27478b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -10,11 +10,11 @@ def predict(img):
10
  pred,pred_idx,probs = learn.predict(img)
11
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
12
 
13
- title = "Irish Potato and Common beans diseases classfier"
14
- description = "An app for Irish Potato and Common beans diseases Classisfication"
15
- article="<p style='text-align: center'>This app detects and categorizes diseases in Irish Potatoes and Common Beans, such as Common Bean Anthracnose, Bean Rust, Early Blight, and Late Blight. If the app labels an image as <b>other</b>, it implies the uploaded image is not of a leaf, or the camera angle makes identification challenging for the model. Please refer to the examples and upload a clear, close-up picture of the leaf.</p>"
16
  examples = ['image2.jpeg', 'image3.jpg']
17
  interpretation='default'
18
  enable_queue=True
19
 
20
- gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(512, 512)),outputs=gr.outputs.Label(num_top_classes=3),title=title,description=description,article=article,examples=examples,interpretation=interpretation,enable_queue=enable_queue).launch(share=True)
 
10
  pred,pred_idx,probs = learn.predict(img)
11
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
12
 
13
+ #title = "Irish Potato and Common beans diseases classfier"
14
+ #description = "An app for Irish Potato and Common beans diseases Classisfication"
15
+ #article="<p style='text-align: center'>This app detects and categorizes diseases in Irish Potatoes and Common Beans, such as Common Bean Anthracnose, Bean Rust, Early Blight, and Late Blight. If the app labels an image as <b>other</b>, it implies the uploaded image is not of a leaf, or the camera angle makes identification challenging for the model. Please refer to the examples and upload a clear, close-up picture of the leaf.</p>"
16
  examples = ['image2.jpeg', 'image3.jpg']
17
  interpretation='default'
18
  enable_queue=True
19
 
20
+ gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(512, 512)),outputs=gr.outputs.Label(num_top_classes=3),examples=examples,interpretation=interpretation,enable_queue=enable_queue).launch(share=True)