NoCrypt commited on
Commit
3a490eb
1 Parent(s): f6edf83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -89,7 +89,7 @@ def predict(image: PIL.Image.Image, score_threshold: float,
89
  res[label] = prob
90
  b = dict(sorted(res.items(),key=lambda item:item[1], reverse=True))
91
  a = ', '.join(list(b.keys())).replace('_',' ')
92
- return a
93
 
94
 
95
  def main():
@@ -112,7 +112,7 @@ def main():
112
  default=args.score_threshold,
113
  label='Score Threshold'),
114
  ],
115
- gr.outputs.Textbox(label='Output'),
116
  title=TITLE,
117
  description=DESCRIPTION,
118
  theme=args.theme,
 
89
  res[label] = prob
90
  b = dict(sorted(res.items(),key=lambda item:item[1], reverse=True))
91
  a = ', '.join(list(b.keys())).replace('_',' ')
92
+ return (a,res)
93
 
94
 
95
  def main():
 
112
  default=args.score_threshold,
113
  label='Score Threshold'),
114
  ],
115
+ ['text', gr.outputs.Label(label=Output)],
116
  title=TITLE,
117
  description=DESCRIPTION,
118
  theme=args.theme,