Ermond commited on
Commit
35c26d1
1 Parent(s): 1de9d3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -32,11 +32,13 @@ def predict(base64: str, queries: str, box_threshold: float, text_threshold: flo
32
  text_threshold=text_threshold,
33
  target_sizes=[image.size[::-1]]
34
  )
35
- return {
36
  "scores": [float(s) for s in results[0]["scores"]],
37
  "labels": results[0]["labels"],
38
  "boxes": [[float(x) for x in box] for box in results[0]["boxes"]]
39
  }
 
 
40
 
41
  demo = gr.Interface(
42
  fn=predict,
 
32
  text_threshold=text_threshold,
33
  target_sizes=[image.size[::-1]]
34
  )
35
+ fmt_results = {
36
  "scores": [float(s) for s in results[0]["scores"]],
37
  "labels": results[0]["labels"],
38
  "boxes": [[float(x) for x in box] for box in results[0]["boxes"]]
39
  }
40
+ print(fmt_results)
41
+ return fmt_results
42
 
43
  demo = gr.Interface(
44
  fn=predict,