Update ocr_extractor.py
Browse files- ocr_extractor.py +1 -1
ocr_extractor.py
CHANGED
|
@@ -89,7 +89,7 @@ def weighted_vote(results, weights):
|
|
| 89 |
|
| 90 |
def process_file(file, weights_file):
|
| 91 |
weights = load_weights(weights_file)
|
| 92 |
-
with tempfile.NamedTemporaryFile(delete=
|
| 93 |
temp_file.write(file.getvalue())
|
| 94 |
temp_file_path = temp_file.name
|
| 95 |
|
|
|
|
| 89 |
|
| 90 |
def process_file(file, weights_file):
|
| 91 |
weights = load_weights(weights_file)
|
| 92 |
+
with tempfile.NamedTemporaryFile(delete=True, suffix=os.path.splitext(file.name)[1]) as temp_file:
|
| 93 |
temp_file.write(file.getvalue())
|
| 94 |
temp_file_path = temp_file.name
|
| 95 |
|