Docty commited on
Commit
015b4fa
·
verified ·
1 Parent(s): 2ed7142

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,15 +1,15 @@
1
  import gradio as gr
2
 
3
- from transformers import pipeline
4
 
5
- pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-en-es")
6
 
7
  def predict(text):
8
- return pipe(text)[0]["translation_text"]
9
 
10
  demo = gr.Interface(
11
  fn=predict,
12
- inputs='text',
13
  outputs='text',
14
  )
15
 
 
1
  import gradio as gr
2
 
3
+
4
 
5
+
6
 
7
  def predict(text):
8
+ return text
9
 
10
  demo = gr.Interface(
11
  fn=predict,
12
+ inputs='textbox',
13
  outputs='text',
14
  )
15