Wootang01 commited on
Commit
33cfa6a
·
1 Parent(s): 1d6f190

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -8,6 +8,11 @@ import requests
8
  response = requests.get("https://git.io/JJkYN")
9
  labels = response.text.split("\n")
10
 
 
 
 
 
 
11
  def classify_image(inp):
12
  inp = inp.reshape((-1, 224, 224, 3))
13
  inp = tf.keras.applications.mobilenet_v2.preprocess_input(inp)
@@ -19,4 +24,7 @@ import gradio as gr
19
 
20
  gr.Interface(fn=classify_image,
21
  inputs=gr.inputs.Image(shape=(224, 224)),
22
- outputs=gr.outputs.Label(num_top_classes=3)).launch()
 
 
 
 
8
  response = requests.get("https://git.io/JJkYN")
9
  labels = response.text.split("\n")
10
 
11
+ title = "Image Classifier Two -- Keras Mobile Net"
12
+ 13 description = """This machine has vision. It can see objects and concepts in an image. To test the machine, upload or drop an image, submit and read the results. The results comprise a list of words that the machine sees in the image. Beside a word, the length of the bar indicates the confidence with which the machine sees the word. The longer the bar, the more confident the machine is.
13
+ 14 """
14
+ 15 article = "This app was made by following [this Gradio guide](https://gradio.app/image_classification_in_tensorflow/)."
15
+
16
  def classify_image(inp):
17
  inp = inp.reshape((-1, 224, 224, 3))
18
  inp = tf.keras.applications.mobilenet_v2.preprocess_input(inp)
 
24
 
25
  gr.Interface(fn=classify_image,
26
  inputs=gr.inputs.Image(shape=(224, 224)),
27
+ outputs=gr.outputs.Label(num_top_classes=3),
28
+ title=title,
29
+ description=description,
30
+ article=article).launch()