Nikhitha2310 commited on
Commit
57077e6
·
verified ·
1 Parent(s): af78ff4

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import transformers
3
+ from transfomers import pipeline
4
+ generator = pipeline('text-generation', model='gpt2')
5
+ text=st.text_input("Enter a text")
6
+ btn=st.button("Submit")
7
+ if(text and btn):
8
+ output=generator("text")
9
+ st.write(output[0]['generated_text'])