Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ toxic_model = pipeline("text-classification", model="Matt09Miao/GP5_tweet_toxic"
|
|
8 |
|
9 |
# text2story
|
10 |
def text2story(text):
|
11 |
-
pipe = pipeline("
|
12 |
tweet_text = pipe(text)
|
13 |
return tweet_text
|
14 |
|
@@ -26,7 +26,6 @@ st.header("Please input your first word of a Tweet :performing_arts:")
|
|
26 |
input = st.text_input("In put your first word...")
|
27 |
|
28 |
if input is not None:
|
29 |
-
|
30 |
#Stage 1: Input to Tweet
|
31 |
st.text('Generating a Tweet...')
|
32 |
tweet = text2story(input)
|
|
|
8 |
|
9 |
# text2story
|
10 |
def text2story(text):
|
11 |
+
pipe = pipeline("text-generation", model="openai-community/gpt2")
|
12 |
tweet_text = pipe(text)
|
13 |
return tweet_text
|
14 |
|
|
|
26 |
input = st.text_input("In put your first word...")
|
27 |
|
28 |
if input is not None:
|
|
|
29 |
#Stage 1: Input to Tweet
|
30 |
st.text('Generating a Tweet...')
|
31 |
tweet = text2story(input)
|