Spaces:
Running
Running
File size: 417 Bytes
b60a13a 1e6650f b60a13a 5fe34af |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
from transformers import pipeline
import gradio as gr
# First define a prediction function that takes in a text prompt and returns the text completion
model = pipeline('text-generation')
def predict(prompt):
completion = model(prompt)[0]['generated_text']
return completion
# Now create the interface
gr.Interface(fn=predict, inputs="text", outputs="text", css=".footer{display:none !important}").launch()
|