Kingston Yip commited on
Commit
59bcd67
·
1 Parent(s): 59c9349
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -21,7 +21,6 @@ if submitted:
21
  with st.spinner(text="loading..."):
22
  out = clf(tweet)
23
  st.success('Done!')
24
- st.balloons()
25
  st.json(out)
26
 
27
  basic_prompt = '''
@@ -36,6 +35,7 @@ if submitted:
36
  '''
37
 
38
  if out[0]["label"] == "POSITIVE" or out[0]["label"] == "POS":
 
39
  prompt = f"{basic_prompt} + \n\nThe user wrote a tweet that says: {tweet}, compliment them on how nice of a person they are! Remember try to be as cringe and awkard as possible!"
40
  generator = pipeline(model="gpt2")
41
  response = generator(prompt)
 
21
  with st.spinner(text="loading..."):
22
  out = clf(tweet)
23
  st.success('Done!')
 
24
  st.json(out)
25
 
26
  basic_prompt = '''
 
35
  '''
36
 
37
  if out[0]["label"] == "POSITIVE" or out[0]["label"] == "POS":
38
+ st.balloons()
39
  prompt = f"{basic_prompt} + \n\nThe user wrote a tweet that says: {tweet}, compliment them on how nice of a person they are! Remember try to be as cringe and awkard as possible!"
40
  generator = pipeline(model="gpt2")
41
  response = generator(prompt)