shran commited on
Commit
cbabcbd
·
1 Parent(s): 4cf51a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -2,10 +2,10 @@ import gradio as gr
2
 
3
  from transformers import pipeline
4
 
5
- pipe = pipeline("translation", model="NYTK/translation-m2m100-1.2B-multi12-hungarian")
6
 
7
  def predict(text):
8
- return pipe(text)[0]["translation_text"]
9
 
10
  demo = gr.Interface(
11
  fn=predict,
 
2
 
3
  from transformers import pipeline
4
 
5
+ pipe = pipeline("question-answering", model="NYTK/translation-m2m100-1.2B-multi12-hungarian")
6
 
7
  def predict(text):
8
+ return pipe(text)[0]["question-answering"]
9
 
10
  demo = gr.Interface(
11
  fn=predict,