Practica8 / app.py
el-filatova's picture
Update app.py
0291eb5 verified
raw
history blame
463 Bytes
import gradio as gr
from transformers import pipeline
calculator = pipeline('text2text-generation', model='el-filatova/mbart-gsm8k')
def predict(text):
return calculator(text)[0]['generated_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(share=True)