Tuana commited on
Commit
9e0a453
1 Parent(s): 7018b53

fixing some bugs and improving the prompt

Browse files
Files changed (3) hide show
  1. app.py +4 -2
  2. utils/haystack.py +15 -5
  3. utils/ui.py +1 -1
app.py CHANGED
@@ -16,10 +16,12 @@ st.write("# 🐤 What have they been tweeting about lately?")
16
  search_bar, button = st.columns(2)
17
  # Search bar
18
  with search_bar:
19
- username = st.text_input("", value=st.session_state.username, on_change=reset_results, label_visibility="collapsed")
20
 
21
  with button:
22
- run_pressed = st.button("Seach tweets")
 
 
23
 
24
  run_query = (
25
  run_pressed or username != st.session_state.username
 
16
  search_bar, button = st.columns(2)
17
  # Search bar
18
  with search_bar:
19
+ username = st.text_input("Please provide a twitter username", on_change=reset_results)
20
 
21
  with button:
22
+ st.write("")
23
+ st.write("")
24
+ run_pressed = st.button("Search tweets")
25
 
26
  run_query = (
27
  run_pressed or username != st.session_state.username
utils/haystack.py CHANGED
@@ -16,18 +16,28 @@ def start_haystack():
16
 
17
  Examples:
18
 
19
- Twitter stream: Many people in our community asked how to utilize LLMs in their NLP pipelines and how to modify prompts for their tasks.…
20
- RT @deepset_ai: We use parts of news articles from The Guardian as documents and create custom prompt templates to categorize these article
 
 
21
 
22
- Summary: This person has lately been tweeting about NLP and LLMs. Their tweets have been in Enlish
 
23
 
24
  Twitter stream: I've directed my team to set sharper rules on how we deal with unidentified objects.\n\nWe will inventory, improve ca…
25
  the incursion by China’s high-altitude balloon, we enhanced radar to pick up slower objects.\n \nBy doing so, w…
26
  I gave an update on the United States’ response to recent aerial objects.
27
 
28
- Summary: This person has lately been tweeting about an unidentified object and an incursion by China with a high-altitude baloon.
29
- They have been tweeting about the USA. They have had a political tone. They mostly post in English.
 
 
 
 
30
 
 
 
 
31
  Twitter stream: $tweets
32
 
33
  Summary:
 
16
 
17
  Examples:
18
 
19
+ Twitter stream: RT @deepset_ai: Come join our Haystack server for our first Discord event tomorrow, a deepset AMA session with @rusic_milos @malte_pietsch…
20
+ RT @deepset_ai: Join us for a chat! On Thursday 25th we are hosting a 'deepset - Ask Me Anything' session on our brand new Discord. Come…
21
+ RT @deepset_ai: Curious about how you can use @OpenAI GPT3 in a Haystack pipeline? This week we released Haystack 1.7 with which we introdu…
22
+ RT @tuanacelik: So many updates from @deepset_ai today!
23
 
24
+ Summary: This user has lately been retweeting tweets fomr @deepset_ai. The topics of the tweets have been around the Haystack community, NLP and GPT. They've
25
+ been posting in English, and have had a positive, informative tone.
26
 
27
  Twitter stream: I've directed my team to set sharper rules on how we deal with unidentified objects.\n\nWe will inventory, improve ca…
28
  the incursion by China’s high-altitude balloon, we enhanced radar to pick up slower objects.\n \nBy doing so, w…
29
  I gave an update on the United States’ response to recent aerial objects.
30
 
31
+ Summary: This user has lately been tweeting about having sharper rules to deal with unidentified objects and an incursuin by China's high-altitude
32
+ baloon. Their tweets have mostly been neutral but determined in tone. They mostly post in English.
33
+
34
+ Twitter stream: here are some stats from Invisible Women -- lots more where that came from https://t.co/STCkyD1spwstay at home mums are not economically inactive,
35
+ YOUR CHANCE TO COMMENT ON A NEW BRITISH STANDARD FOR MENSTRUAL AND MENOPAUSAL HEALTH IN THE WORKPLACE
36
+ very attacked by South Dakota rn. @CCriadoPerez: The Invisible Women newsletter is BACK. Populist drivel for the modern woman. Also! Alzheimer’s and HRT. And POPPY. Enjoy…..
37
 
38
+ Summary: This user has lately been posting about the womens rights, menstrual and menopausal helpth and The Invisible Women newsletter. They've mostly been posting in English
39
+ and have a positive and informative tone.
40
+
41
  Twitter stream: $tweets
42
 
43
  Summary:
utils/ui.py CHANGED
@@ -9,4 +9,4 @@ def set_initial_state():
9
  set_state_if_absent("result", None)
10
 
11
  def reset_results(*args):
12
- st.session_state.results = None
 
9
  set_state_if_absent("result", None)
10
 
11
  def reset_results(*args):
12
+ st.session_state.result = None