shrusti333 commited on
Commit
a4bbb8d
·
1 Parent(s): 7f233f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -1,4 +1,9 @@
1
  import gradio as gr
 
 
 
 
 
2
  input_texts_translation=[]
3
  target_texts_translation=[]
4
  input_characters_translation=set()
@@ -29,7 +34,7 @@ max_target_length_translation = max([len(i) for i in target_texts_translation])
29
 
30
  #Inference model
31
  #load the model
32
- model_translation = models.load_model("translator/model_translation")
33
  #construct encoder model from the output of second layer
34
  #discard the encoder output and store only states.
35
  enc_outputs_translation, state_h_enc_translation, state_c_enc_translation = model_translation.layers[2].output
 
1
  import gradio as gr
2
+ import numpy as np
3
+ from sklearn.feature_extraction.text import CountVectorizer
4
+ from tensorflow.keras.models import Model
5
+ from tensorflow.keras import models
6
+ from tensorflow.keras.layers import Input,LSTM,Dense
7
  input_texts_translation=[]
8
  target_texts_translation=[]
9
  input_characters_translation=set()
 
34
 
35
  #Inference model
36
  #load the model
37
+ model_translation = models.load_model("model_translation")
38
  #construct encoder model from the output of second layer
39
  #discard the encoder output and store only states.
40
  enc_outputs_translation, state_h_enc_translation, state_c_enc_translation = model_translation.layers[2].output