Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import gradio as gr
|
|
| 4 |
translator = pipeline('text2text-generation', model='edgilr/mbart-neutralization')
|
| 5 |
|
| 6 |
def predict(txt):
|
| 7 |
-
return
|
| 8 |
|
| 9 |
gr.Interface(fn=predict, inputs="text", outputs="text",
|
| 10 |
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)
|
|
|
|
| 4 |
translator = pipeline('text2text-generation', model='edgilr/mbart-neutralization')
|
| 5 |
|
| 6 |
def predict(txt):
|
| 7 |
+
return translator(txt)[0]['generated_text']
|
| 8 |
|
| 9 |
gr.Interface(fn=predict, inputs="text", outputs="text",
|
| 10 |
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)
|