danielolusipe
commited on
Commit
•
61883a9
1
Parent(s):
e21538d
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,12 @@ import tensorflow as tf
|
|
4 |
def split_char(text):
|
5 |
return " ".join(list(text))
|
6 |
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
from spacy.lang.en import English
|
10 |
|
@@ -51,7 +56,6 @@ def make_predictions(Input):
|
|
51 |
|
52 |
# Loading in model and getting a summary of loaded model
|
53 |
#skimlit_universal_sentence_encoder_model=tf.keras.models.load_model("/content/drive/MyDrive/skimlit_models/Universal_sentence_encoder_Tribrid_embedding_model")
|
54 |
-
skimlit_universal_sentence_encoder_model=Universal_sentence_encoder_Tribrid_embedding_model-20220920T213455Z-001
|
55 |
|
56 |
# Making prediction with loaded model on sample abstract
|
57 |
abstract_pred_probs=skimlit_universal_sentence_encoder_model.predict(x=(abstract_line_number_one_hot,
|
|
|
4 |
def split_char(text):
|
5 |
return " ".join(list(text))
|
6 |
|
7 |
+
# Unzipping model
|
8 |
+
import zipfile
|
9 |
+
zip_ref = zipfile.ZipFile(Universal_sentence_encoder_Tribrid_embedding_model-20220920T213455Z-001.zip, "r")
|
10 |
+
zip_ref.extractall()
|
11 |
+
zip_ref.close()
|
12 |
+
|
13 |
|
14 |
from spacy.lang.en import English
|
15 |
|
|
|
56 |
|
57 |
# Loading in model and getting a summary of loaded model
|
58 |
#skimlit_universal_sentence_encoder_model=tf.keras.models.load_model("/content/drive/MyDrive/skimlit_models/Universal_sentence_encoder_Tribrid_embedding_model")
|
|
|
59 |
|
60 |
# Making prediction with loaded model on sample abstract
|
61 |
abstract_pred_probs=skimlit_universal_sentence_encoder_model.predict(x=(abstract_line_number_one_hot,
|