capjamesg commited on
Commit
e8194f8
·
1 Parent(s): 3f7e090

add descriptions to fields, add source code links

Browse files
Files changed (1) hide show
  1. app.py +10 -5
app.py CHANGED
@@ -183,14 +183,19 @@ def detect_books(image):
183
 
184
  iface = gr.Interface(
185
  fn=detect_books,
186
- description="Use Open Shelves to detect books in an image. The model will return the annotated image with the detected books, the titles of the books, and the ISBNs of the books.",
 
 
 
 
 
187
  inputs=gr.components.Image(label="Input Image"),
188
  # outputs should be an image and a list of text
189
  outputs=[
190
- gr.components.Image(label="Annotated Image"),
191
- gr.components.Textbox(label="Detected Books"),
192
- gr.components.Textbox(label="ISBNs"),
193
- gr.components.Textbox(label="SVG"),
194
  ],
195
  title="Open Shelves",
196
  allow_flagging=False,
 
183
 
184
  iface = gr.Interface(
185
  fn=detect_books,
186
+ description="""
187
+ Use Open Shelves to detect books in an image. The model will return the annotated image with the detected books, the titles of the books, and the ISBNs of the books.
188
+
189
+ [View the project source code](https://github.com/capjamesg/open-shelves).
190
+
191
+ [View the dataset on which the book segmentation model was trained](https://universe.roboflow.com/capjamesg/open-shelves).""",
192
  inputs=gr.components.Image(label="Input Image"),
193
  # outputs should be an image and a list of text
194
  outputs=[
195
+ gr.components.Textbox(label="Detected Books", info="The detected books."),
196
+ gr.components.Image(label="Annotated Image", type="pil"),
197
+ gr.components.Textbox(label="ISBNs", info="The ISBNs of the detected books."),
198
+ gr.components.Textbox(label="SVG", info="Copy-paste this code onto a web page to create a clickable bookshelf. NB: This code doesn't scale to different screen resolutions."),
199
  ],
200
  title="Open Shelves",
201
  allow_flagging=False,