CoolFace
Apppublic

CarlosMF/Test2

sourceHugging Facecc0-1.0updated 4y agoView on Hugging Face
0likes
app.py15 linesDownload Raw Back to root
1import gradio as gr2from transformers import pipeline3 4pipeline = pipeline(task="text-generation", model="bigscience/bloom-350m")5 6def translate(text):7  predictions = pipeline(text)8  return {p["label"]: p["score"] for p in predictions}9 10gr.Interface(11    predict,12    inputs=gr.inputs.Text(label="text", type="filepath"),13    outputs=gr.outputs.Label,14    title="Middle Earth Tales",15).launch()