Sakil commited on
Commit
a6b555e
1 Parent(s): baf0542

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from transformers import pipeline
3
+ generator = pipeline("text-generation", model="distilgpt2")
4
+ def essay_generation(input_text):
5
+ return generator(input_text,max_length=250)
6
+ 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.")
7
+ iface.launch(inline=False)