aznasut commited on
Commit
e593c27
·
1 Parent(s): 8d70a49

change response type

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -123,7 +123,7 @@ async def classify_image(file: UploadFile = File(None)):
123
  response_data = {
124
  # "prediction": predicted_label,
125
  "prediction": predicted_label["label"],
126
- "confidence":confidence,
127
  }
128
  # Use the model to classify the image
129
  # results = model(image)
@@ -219,7 +219,7 @@ async def classify_images(request: ImageUrlsRequest):
219
  detection_result = {
220
  # "prediction": predicted_label,
221
  "prediction": predicted_label["label"],
222
- "confidence":confidence,
223
  }
224
  # Use the model to classify the image
225
  # results = model(image)
 
123
  response_data = {
124
  # "prediction": predicted_label,
125
  "prediction": predicted_label["label"],
126
+ "confidence": str(confidence),
127
  }
128
  # Use the model to classify the image
129
  # results = model(image)
 
219
  detection_result = {
220
  # "prediction": predicted_label,
221
  "prediction": predicted_label["label"],
222
+ "confidence": str(confidence),
223
  }
224
  # Use the model to classify the image
225
  # results = model(image)