pavan1221 commited on
Commit
16f23a5
·
verified ·
1 Parent(s): f7c4d7a

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -158,13 +158,14 @@ def analyze():
158
  p["wiki_url"] = url
159
 
160
  # Annotate image
161
- annotated_bytes = annotate(raw_bytes, plants)
162
  annotated_b64 = base64.b64encode(annotated_bytes).decode("utf-8")
163
 
164
  return jsonify({
165
  "plants": plants,
166
  "count": len(plants),
167
- "annotated_image": f"data:image/jpeg;base64,{annotated_b64}"
 
168
  })
169
 
170
  except Exception as e:
 
158
  p["wiki_url"] = url
159
 
160
  # Annotate image
161
+ annotated_bytes, dot_positions = annotate(raw_bytes, plants)
162
  annotated_b64 = base64.b64encode(annotated_bytes).decode("utf-8")
163
 
164
  return jsonify({
165
  "plants": plants,
166
  "count": len(plants),
167
+ "annotated_image": f"data:image/png;base64,{annotated_b64}",
168
+ "dot_positions": dot_positions
169
  })
170
 
171
  except Exception as e: