Skip to content

Commit

Permalink
fix: set TensorFlow version to 2.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Kohulan committed Feb 17, 2023
1 parent 99eb533 commit 1221cad
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DECIMER/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import efficientnet.tfkeras as efn
import DECIMER.Efficient_Net_encoder
import DECIMER.Transformer_decoder
from PIL import Image
from PIL import Image, ImageEnhance
import numpy as np
import io
import cv2
Expand Down
Binary file added Tests/caffeine.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions Tests/test_functions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pytest
from DECIMER import predict_SMILES

def get_imagetosmiles():
img_path = 'Tests/caffeine.png'
expected_result = "CN1C=NC2=C1C(=O)N(C)C(=O)N2C"
actual_result = predict_SMILES(image_path)
assert expected_result == actual_result
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
packages=setuptools.find_packages(),
license="MIT",
install_requires=[
"tensorflow>=2.8.0",
"tensorflow==2.10.0",
"opencv-python",
"pystow",
"pyheif",
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py37, py38, py39, py310, lint
envlist = py38, lint
requires = tox-conda

[testenv]
Expand Down Expand Up @@ -41,3 +41,4 @@ exclude =
DECIMER/efficientnetv2/effnetv2_model.py,
DECIMER/efficientnetv2/hparams.py,
DECIMER/efficientnetv2/utils.py,
Tests/test_functions.py,

0 comments on commit 1221cad

Please sign in to comment.