diff --git a/standalone_app/Snap2LaTeX.py b/standalone_app/Snap2LaTeX.py index 291fb1f..e5780ff 100644 --- a/standalone_app/Snap2LaTeX.py +++ b/standalone_app/Snap2LaTeX.py @@ -18,7 +18,7 @@ import multiprocessing as mp -VERSION = "0.5.0" +VERSION = "0.6.0" class StdoutQueue(Queue): @@ -144,11 +144,11 @@ def analyze_image(temp_file, temp_dir): pixel_values.to(device), decoder_input_ids=decoder_input_ids.to(device), max_length=model.decoder.config.max_length, - early_stopping=True, + early_stopping=False, pad_token_id=tokenizer.pad_token_id, eos_token_id=tokenizer.eos_token_id, use_cache=True, - num_beams=5, + num_beams=1, bad_words_ids=[[tokenizer.unk_token_id]], return_dict_in_generate=True, ) @@ -173,6 +173,7 @@ def analyze_image(temp_file, temp_dir): dialog.setIconPixmap(icon_pixmap) dialog.setText(f"An error occurred: {e}") dialog.exec() + raise e finally: os.remove(temp_file) os.rmdir(temp_dir)