drhead commited on
Commit
accdcf1
1 Parent(s): c41c5f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -10
app.py CHANGED
@@ -151,16 +151,23 @@ def create_tags(image, threshold):
151
  return text_no_impl, tag_score
152
 
153
  with gr.Blocks() as demo:
154
- with gr.Tab("Single Image"):
155
- gr.Interface(
156
- create_tags,
157
- inputs=[gr.Image(label="Source", sources=['upload', 'webcam'], type='pil'), gr.Slider(minimum=0.00, maximum=1.00, step=0.01, value=0.30, label="Threshold")],
158
- outputs=[
159
- gr.Textbox(label="Tag String"),
160
- gr.Label(label="Tag Predictions", num_top_classes=200),
161
- ],
162
- allow_flagging="never",
163
- )
 
 
 
 
 
 
 
164
 
165
  if __name__ == "__main__":
166
  demo.launch()
 
151
  return text_no_impl, tag_score
152
 
153
  with gr.Blocks() as demo:
154
+ gr.Markdown("""
155
+ ## Joint Tagger Project: PILOT Demo
156
+ This tagger is designed for use on furry images (though may very well work on out-of-distribution images, potentially with funny results). A threshold of 0.2 is recommended. Lower thresholds often turn up more valid tags, but can also result in some amount of hallucinated tags.
157
+
158
+ This tagger is the result of joint efforts between members of the RedRocket team.
159
+
160
+ Special thanks to Minotoro at frosting.ai for providing the compute power for this project.
161
+ """)
162
+ gr.Interface(
163
+ create_tags,
164
+ inputs=[gr.Image(label="Source", sources=['upload', 'webcam'], type='pil'), gr.Slider(minimum=0.00, maximum=1.00, step=0.01, value=0.20, label="Threshold")],
165
+ outputs=[
166
+ gr.Textbox(label="Tag String"),
167
+ gr.Label(label="Tag Predictions", num_top_classes=200),
168
+ ],
169
+ allow_flagging="never",
170
+ )
171
 
172
  if __name__ == "__main__":
173
  demo.launch()