Implemented OCR decoding for prescription text
Browse files
app.py
CHANGED
|
@@ -21,6 +21,7 @@ def preprocess_image(image):
|
|
| 21 |
def predict_text(image):
|
| 22 |
processed_image = preprocess_image(image)
|
| 23 |
prediction = model.predict(processed_image)
|
|
|
|
| 24 |
predicted_text = decode_prediction(prediction) # Implement your decoding logic
|
| 25 |
return predicted_text
|
| 26 |
|
|
|
|
| 21 |
def predict_text(image):
|
| 22 |
processed_image = preprocess_image(image)
|
| 23 |
prediction = model.predict(processed_image)
|
| 24 |
+
print(prediction) # Check what the model is outputting
|
| 25 |
predicted_text = decode_prediction(prediction) # Implement your decoding logic
|
| 26 |
return predicted_text
|
| 27 |
|