el-filatova commited on
Commit
88826f7
·
verified ·
1 Parent(s): 1de64d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr
2
 
3
  from transformers import pipeline
4
- classifier = pipeline('text2text-generation', model='el-filatova/mbart-gsm8k')
5
 
6
  def predict(text):
7
- return neutralizer(text)
8
 
9
  iface = gr.Interface(fn=predict, inputs=[gr.Textbox(value="Natalia sold clips to 48 of her friends in April, and then she sold half as many clips in May. How many clips did Natalia sell altogether in April and May?")], outputs="text")
10
  iface.launch()
 
1
  import gradio as gr
2
 
3
  from transformers import pipeline
4
+ calculator = pipeline('text2text-generation', model='el-filatova/mbart-gsm8k')
5
 
6
  def predict(text):
7
+ return calculator(text)[0]['generated_text']
8
 
9
  iface = gr.Interface(fn=predict, inputs=[gr.Textbox(value="Natalia sold clips to 48 of her friends in April, and then she sold half as many clips in May. How many clips did Natalia sell altogether in April and May?")], outputs="text")
10
  iface.launch()