TestAPI / app.py
Martin van Dijk
Update space
70a75f3
raw
history blame
253 Bytes
from transformers import pipeline
model = pipeline("translation")
def predict(prompt):
completion = model(prompt)[0]["generated_text"]
return completion
import gradio as gr
gr.Interface(fn=predict, inputs="text", outputs="text").launch()