Matt09Miao commited on
Commit
4b5220d
·
verified ·
1 Parent(s): 3fe7bd2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -7,10 +7,10 @@ toxic_model = pipeline("text-classification", model="Matt09Miao/GP5_tweet_toxic"
7
 
8
 
9
  # text2story
10
- def text2story(text):
11
  pipe = pipeline("text-generation", model="pranavpsv/genre-story-generator-v2")
12
- tweet_text = pipe(text)
13
- return tweet_text
14
 
15
  # text2audio
16
  def text2audio(toxic_result):
@@ -23,7 +23,7 @@ def text2audio(toxic_result):
23
  st.set_page_config(page_title="Generate Your Tweet and Toxicity Analysis")
24
 
25
  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
  #Stage 1: Input to Tweet
 
7
 
8
 
9
  # text2story
10
+ def text2story(input):
11
  pipe = pipeline("text-generation", model="pranavpsv/genre-story-generator-v2")
12
+ tweet = pipe(input)
13
+ return tweet
14
 
15
  # text2audio
16
  def text2audio(toxic_result):
 
23
  st.set_page_config(page_title="Generate Your Tweet and Toxicity Analysis")
24
 
25
  st.header("Please input your first word of a Tweet :performing_arts:")
26
+ input = st.text_input("Please input your first word...")
27
 
28
  if input is not None:
29
  #Stage 1: Input to Tweet