Destovania commited on
Commit
0e29751
β€’
1 Parent(s): 671b075

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -2,12 +2,11 @@ import zipfile
2
  import gradio as gr
3
  import tensorflow as tf
4
  from transformers import pipeline
5
- from tensorflow.keras.models import load_model
6
  import tensorflow_text as text
7
 
8
  pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-tr-en")
9
 
10
- model = load_model('./')
11
 
12
  def main(input):
13
  pure_out = reloaded_model.predict(pipe(input))
 
2
  import gradio as gr
3
  import tensorflow as tf
4
  from transformers import pipeline
 
5
  import tensorflow_text as text
6
 
7
  pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-tr-en")
8
 
9
+ reloaded_model = tf.saved_model.load('./')
10
 
11
  def main(input):
12
  pure_out = reloaded_model.predict(pipe(input))