not-lain commited on
Commit
942991c
β€’
1 Parent(s): 4c6aa6e

switched to text

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,7 +12,7 @@ def predict(input_img,threshold,return_scores):
12
  threshold=threshold, # optional parameter defaults to 0
13
  return_scores=return_scores, # optional parameter defaults to False
14
  )
15
- return f"""```json\n{predictions}```"""
16
 
17
 
18
  description = """
@@ -25,7 +25,7 @@ shoutout to [@p1atdev](https://huggingface.co/p1atdev) for his awesome work **~(
25
  app = gr.Interface(
26
  predict,
27
  inputs=[gr.Image(label="add your image here"),gr.Slider(0,1,0.5,label="threshold"),gr.Checkbox(False,label="show scores")],
28
- outputs=gr.Markdown(label="tags",value="``\n\n\n```"),
29
  title="Image Annotator",
30
  description=description,
31
  examples=[["./lowres XD.jpg",0.5,False],["./pixeled lain.jpg",0.8,True]],
 
12
  threshold=threshold, # optional parameter defaults to 0
13
  return_scores=return_scores, # optional parameter defaults to False
14
  )
15
+ return predictions
16
 
17
 
18
  description = """
 
25
  app = gr.Interface(
26
  predict,
27
  inputs=[gr.Image(label="add your image here"),gr.Slider(0,1,0.5,label="threshold"),gr.Checkbox(False,label="show scores")],
28
+ outputs=gr.Text(label="tags"),
29
  title="Image Annotator",
30
  description=description,
31
  examples=[["./lowres XD.jpg",0.5,False],["./pixeled lain.jpg",0.8,True]],