Pashtetuum commited on
Commit
cbe2334
1 Parent(s): a91dc8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -38,10 +38,7 @@ def predict(zip_bytes):
38
  predicted_class = np.argmax(prediction)
39
  decoded_class = label_encoder.inverse_transform([predicted_class])[0]
40
  predicted_class_translation = translator(decoded_class)
41
- # Сохранение изображения в формате base64
42
- _, img_encoded = cv2.imencode('.png', img_resized)
43
- img_base64 = base64.b64encode(img_encoded).decode('utf-8')
44
- predictions.append((filename,f'<img src="data:image/png;base64,{img_base64}">', predicted_class_translation))
45
  return predictions
46
 
47
  interface = gr.Interface(
 
38
  predicted_class = np.argmax(prediction)
39
  decoded_class = label_encoder.inverse_transform([predicted_class])[0]
40
  predicted_class_translation = translator(decoded_class)
41
+ predictions.append((filename, predicted_class_translation))
 
 
 
42
  return predictions
43
 
44
  interface = gr.Interface(