Skip to content

Commit

Permalink
Update utilities.py
Browse files Browse the repository at this point in the history
  • Loading branch information
SaPhyoThuHtet authored Jul 30, 2024
1 parent 7181de3 commit a41c8f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def multilingual_semi_syllable_break(user_input):
result = re.sub(r" +", " ", result)
return result

"""" Zawgyi Unicode Detection"""
"""" Zawgyi Unicode Detection
@st.cache_resource
def load_zawgyi_unicode_detection_model():
model = tf.keras.models.load_model("model/zawgyi-unicode-detection/zawgyiunicodedetectionstreamlit.h5")
Expand All @@ -40,7 +40,7 @@ def zawgyi_unicode_detection(input:str)->str:
testing_sequences = zawgyi_unicode_tokenizer.texts_to_sequences([syllable_tokenization(input)])
testing_padded = pad_sequences(testing_sequences,maxlen=150, truncating='post',padding='post')
return "Unicode Encoding" if model.predict(testing_padded)[0][0]>=0.5 else "Zawgyi Encoding"

"""
"""
Keywords Detection
"""
Expand Down

0 comments on commit a41c8f0

Please sign in to comment.