Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,12 +6,8 @@ from transformers import pipeline
|
|
6 |
toxic_model = pipeline("text-classification", model="Matt09Miao/GP5_tweet_toxic")
|
7 |
|
8 |
|
9 |
-
|
10 |
-
|
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):
|
17 |
pipe = pipeline("text-to-audio", model="Matthijs/mms-tts-eng")
|
@@ -28,7 +24,7 @@ input = st.text_input("Please input your first word...")
|
|
28 |
if input is not None:
|
29 |
#Stage 1: Input to Tweet
|
30 |
st.text('Generating a Tweet...')
|
31 |
-
tweet =
|
32 |
st.write(tweet)
|
33 |
|
34 |
#Stage 2: Tweet Toxicity Analysis
|
|
|
6 |
toxic_model = pipeline("text-classification", model="Matt09Miao/GP5_tweet_toxic")
|
7 |
|
8 |
|
9 |
+
text2tweet = pipeline("text-generation", model="pranavpsv/genre-story-generator-v2")
|
10 |
+
|
|
|
|
|
|
|
|
|
11 |
# text2audio
|
12 |
def text2audio(toxic_result):
|
13 |
pipe = pipeline("text-to-audio", model="Matthijs/mms-tts-eng")
|
|
|
24 |
if input is not None:
|
25 |
#Stage 1: Input to Tweet
|
26 |
st.text('Generating a Tweet...')
|
27 |
+
tweet = text2tweet(input)
|
28 |
st.write(tweet)
|
29 |
|
30 |
#Stage 2: Tweet Toxicity Analysis
|