Practica8 / app.py
edgilr's picture
Update app.py
daebf08 verified
raw
history blame contribute delete
No virus
496 Bytes
from transformers import pipeline
import gradio as gr
translator = pipeline('text2text-generation', model='edgilr/mbart-neutralization')
def predict(txt):
return translator(txt)[0]['generated_text']
gr.Interface(fn=predict, inputs="text", outputs="text",
examples=['You are an AI assistant. User will you give you a task. Your goal is to complete the task as faithfully as you can. While performing the task think step-by-step and justify your steps.']).launch(share=True)