wvle commited on
Commit
360ee3a
·
1 Parent(s): f508356

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import gradio as gr
 
2
 
3
  import tensorflow as tf
4
  from tensorflow import keras
@@ -17,6 +18,11 @@ EMBED_DIM = 512
17
  # Per-layer units in the feed-forward network
18
  FF_DIM = 512
19
 
 
 
 
 
 
20
  # text preprocessing
21
  def custom_standardization(input_string):
22
  lowercase = tf.strings.lower(input_string)
 
1
  import gradio as gr
2
+ import pickle
3
 
4
  import tensorflow as tf
5
  from tensorflow import keras
 
18
  # Per-layer units in the feed-forward network
19
  FF_DIM = 512
20
 
21
+ # load the text data
22
+ open_file = open('text.pkl', "rb")
23
+ text_data = pickle.load(open_file)
24
+ open_file.close()
25
+
26
  # text preprocessing
27
  def custom_standardization(input_string):
28
  lowercase = tf.strings.lower(input_string)