Practica8 / app.py
el-filatova's picture
Update app.py
ddc19ac verified
raw
history blame contribute delete
370 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="I have two apples and four oranges. How many fruits do I have?")], outputs="text")
iface.launch(share=True)