Timjo88 commited on
Commit
7aeb03c
1 Parent(s): f923aab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -8,6 +8,9 @@ labels = learn.dls.vocab
8
  def predict(img):
9
  pred,idx,probs = learn.predict(img)
10
  return {labels[i]: float(probs[i]) for i,_ in enumerate(labels)}
 
 
 
11
 
12
  image = gr.inputs.Image(shape=(256,256))
13
  label = gr.outputs.Label()
@@ -15,6 +18,9 @@ examples = ['house1.jpg','house2.jpg','house3.jpg','house4.jpg','house5.jpg']
15
  title = "Storm Damaged House Classifier with fast.ai"
16
  description = "Has your house possibly been damaged by recent storms, use fast.ai to detect damage to your home with this fine-tuned resnet 50 model"
17
 
18
- intf = gr.Interface(fn=predict, inputs=image, outputs=label, examples=examples,title=title,description=description)
19
 
20
  intf.launch()
 
 
 
 
8
  def predict(img):
9
  pred,idx,probs = learn.predict(img)
10
  return {labels[i]: float(probs[i]) for i,_ in enumerate(labels)}
11
+
12
+ with open("article.md") as f:
13
+ article = f.read()
14
 
15
  image = gr.inputs.Image(shape=(256,256))
16
  label = gr.outputs.Label()
 
18
  title = "Storm Damaged House Classifier with fast.ai"
19
  description = "Has your house possibly been damaged by recent storms, use fast.ai to detect damage to your home with this fine-tuned resnet 50 model"
20
 
21
+ intf = gr.Interface(fn=predict, inputs=image, outputs=label, examples=examples,title=title,description=description, article=article)
22
 
23
  intf.launch()
24
+
25
+
26
+