Spaces:
Runtime error
Runtime error
File size: 304 Bytes
0e1d9ba e3fbad4 d253690 0e1d9ba d253690 0e1d9ba e3fbad4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
from transformers import pipeline
import gradio as gr
model = pipeline("text-generation")
def predict(prompt):
completion = model(prompt)[0]["generated_text"]
return completion
predict("My favorite programming language is")
gr.Interface(fn=predict, inputs="text", outputs="text").launch()
|