Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| from transformers import pipeline | |
| generator = pipeline("text-generation", model="distilgpt2") | |
| def essay_generation(input_text): | |
| return generator(input_text,max_length=250) | |
| iface = gr.Interface(essay_generation,inputs="text",outputs="text",title='Essay Generator APP',theme = "dark-peach",examples=["what is data science?","What is Natural Language Processing","What is Time series?"], description="This app helps in generating text upto 250 characters.") | |
| iface.launch(inline=False) | |