Skip to content

Commit

Permalink
Update version
Browse files Browse the repository at this point in the history
  • Loading branch information
ProfFan committed May 3, 2024
1 parent df9d90e commit fd40ecd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions standalone_app/Snap2LaTeX.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import multiprocessing as mp

VERSION = "0.5.0"
VERSION = "0.6.0"


class StdoutQueue(Queue):
Expand Down Expand Up @@ -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,
)
Expand All @@ -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)
Expand Down

0 comments on commit fd40ecd

Please sign in to comment.