File size: 433 Bytes
21c0ebb
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
import gradio as gr

from transformers import pipeline
classifier = pipeline('text2text-generation', model='el-filatova/mbart-gsm8k')

def predict(text):
    return neutralizer(text)

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")
iface.launch()