lhzstar commited on
Commit
aafa95b
β€’
1 Parent(s): 2a846a9

new commits

Browse files
app.py CHANGED
@@ -8,17 +8,20 @@ from utils import *
8
  def main():
9
 
10
  hide_footer()
11
- model_list = ["flan-t5-xl"]
12
  celeb_data = get_celeb_data(f'data.json')
13
 
14
  st.sidebar.header("CelebChat")
15
  expander = st.sidebar.expander('About the app')
16
  with expander:
17
- st.markdown("Experience the ultimate celebrity chat demo with this app!")
18
 
19
  expander = st.sidebar.expander('Disclaimer')
20
  with expander:
21
- st.markdown("CelebChat may produce inaccurate information about people, places, or facts.")
 
 
 
22
  if "messages" not in st.session_state:
23
  st.session_state["messages"] = []
24
  if "QA_model_path" not in st.session_state:
@@ -41,13 +44,21 @@ def main():
41
  def example_submit(text):
42
  st.session_state["prompt_from_text"] = text
43
 
44
- st.session_state["celeb_name"] = st.sidebar.selectbox('Choose a celebrity', options=list(celeb_data.keys()))
45
- model_id=st.sidebar.selectbox("Choose Your Flan-T5 model",options=model_list)
46
 
47
  st.session_state["QA_model_path"] = f"google/{model_id}" if "flan-t5" in model_id else model_id
48
 
49
  celeb_gender = celeb_data[st.session_state["celeb_name"]]["gender"]
50
- knowledge = celeb_data[st.session_state["celeb_name"]]["knowledge"]
 
 
 
 
 
 
 
 
51
  st.session_state["celeb_bot"] = CelebBot(st.session_state["celeb_name"],
52
  get_tokenizer(st.session_state["QA_model_path"]),
53
  get_seq2seq_model(st.session_state["QA_model_path"]) if "flan-t5" in st.session_state["QA_model_path"] else get_causal_model(st.session_state["QA_model_path"]),
@@ -67,7 +78,7 @@ def main():
67
  with st.sidebar:
68
  st.write("You can record your question...")
69
  st.session_state["prompt_from_audio"] = speech_to_text(start_prompt="Start Recording",stop_prompt="Stop Recording",language='en',use_container_width=True, just_once=True,key='STT')
70
- st.text_input('Or write something...', key='text_input', on_change=text_submit)
71
  st.write("Example questions:")
72
 
73
  example1 = "Hello! Did you win an Oscar?"
 
8
  def main():
9
 
10
  hide_footer()
11
+ model_list = ["flan-t5-large"]
12
  celeb_data = get_celeb_data(f'data.json')
13
 
14
  st.sidebar.header("CelebChat")
15
  expander = st.sidebar.expander('About the app')
16
  with expander:
17
+ st.markdown("Experience the ultimate celebrity chats with this app!")
18
 
19
  expander = st.sidebar.expander('Disclaimer')
20
  with expander:
21
+ st.markdown("""
22
+ * CelebChat may produce inaccurate information about people, places, or facts.
23
+ * If you have any concerns about your privacy or believe that the app infringes on your rights, please contact me at liuhaozhe2000@gmail.com. I am committed to addressing your concerns and taking any necessary corrective actions.
24
+ """)
25
  if "messages" not in st.session_state:
26
  st.session_state["messages"] = []
27
  if "QA_model_path" not in st.session_state:
 
44
  def example_submit(text):
45
  st.session_state["prompt_from_text"] = text
46
 
47
+ st.session_state["celeb_name"] = st.sidebar.selectbox('Choose your celebrity crush', options=list(celeb_data.keys()))
48
+ model_id=st.sidebar.selectbox("Choose Your model",options=model_list)
49
 
50
  st.session_state["QA_model_path"] = f"google/{model_id}" if "flan-t5" in model_id else model_id
51
 
52
  celeb_gender = celeb_data[st.session_state["celeb_name"]]["gender"]
53
+ # knowledge = celeb_data[st.session_state["celeb_name"]]["knowledge"]
54
+ if st.session_state["celeb_name"] == "Madonna":
55
+ name = "Madonna-American-singer-and-actress"
56
+ elif st.session_state["celeb_name"]== "Anne Hathaway":
57
+ name = "Anne-Hathaway-American-actress"
58
+ else:
59
+ name="-".join(st.session_state["celeb_name"].split(" "))
60
+
61
+ knowledge = get_article(f"https://www.britannica.com/biography/{name}")
62
  st.session_state["celeb_bot"] = CelebBot(st.session_state["celeb_name"],
63
  get_tokenizer(st.session_state["QA_model_path"]),
64
  get_seq2seq_model(st.session_state["QA_model_path"]) if "flan-t5" in st.session_state["QA_model_path"] else get_causal_model(st.session_state["QA_model_path"]),
 
78
  with st.sidebar:
79
  st.write("You can record your question...")
80
  st.session_state["prompt_from_audio"] = speech_to_text(start_prompt="Start Recording",stop_prompt="Stop Recording",language='en',use_container_width=True, just_once=True,key='STT')
81
+ st.text_input('Or text something...', key='text_input', on_change=text_submit)
82
  st.write("Example questions:")
83
 
84
  example1 = "Hello! Did you win an Oscar?"
celebbot.py CHANGED
@@ -88,7 +88,7 @@ class CelebBot():
88
 
89
  # similarities = np.array(similarity)[top_K]
90
 
91
- # print(*list(zip(all_knowledge_assertions, similarities)), sep='\n')
92
 
93
  return ' '.join(all_knowledge_assertions)
94
 
@@ -102,7 +102,7 @@ class CelebBot():
102
  instruction1 = f"Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information."
103
  query = f"Context: {instruction1} {knowledge}\n\nQuestion: {self.text}\n\nAnswer:"
104
  input_ids = self.QA_tokenizer(f"{query}", return_tensors="pt").input_ids
105
- outputs = self.QA_model.generate(input_ids, max_length=1024)
106
  self.text = self.QA_tokenizer.decode(outputs[0], skip_special_tokens=True)
107
 
108
  # instruction2 = f'[Instruction] You are a celebrity named {self.name}. You need to answer the question based on knowledge'
 
88
 
89
  # similarities = np.array(similarity)[top_K]
90
 
91
+ print(*all_knowledge_assertions, sep='\n')
92
 
93
  return ' '.join(all_knowledge_assertions)
94
 
 
102
  instruction1 = f"Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information."
103
  query = f"Context: {instruction1} {knowledge}\n\nQuestion: {self.text}\n\nAnswer:"
104
  input_ids = self.QA_tokenizer(f"{query}", return_tensors="pt").input_ids
105
+ outputs = self.QA_model.generate(input_ids, max_length=1024, do_sample=True, temperature=0.2, repetition_penalty=1.1)
106
  self.text = self.QA_tokenizer.decode(outputs[0], skip_special_tokens=True)
107
 
108
  # instruction2 = f'[Instruction] You are a celebrity named {self.name}. You need to answer the question based on knowledge'
data.json CHANGED
@@ -1,8 +1,29 @@
1
  {
 
 
 
 
 
 
 
 
 
 
 
 
2
  "Adele": {
3
  "knowledge": "Adele, (born May 5, 1988, Tottenham, London, England), English pop singer and songwriter whose soulful emotive voice and traditionally crafted songs made her one of the most broadly popular performers of her generation. Adkins was raised by a young single mother in various working-class neighbourhoods of London. As a child, she enjoyed singing contemporary pop music and learned to play the guitar and the clarinet. However, it was not until her early teens, when she discovered rhythm-and-blues singer Etta James and other mid-20th-century performers, that she began to consider a musical career. While she honed her talents at a government-funded secondary school for the performing arts, a friend began posting songs Adkins had written and recorded onto the social networking Web site Myspace. Her music eventually caught the attention of record labels, and in 2006, several months after graduating, she signed a contract with XL Recordings.After building anticipation in Britain with some well-received live performances, Adele (as she now billed herself) released her first album, 19, in 2008. (The title referred to the age at which she penned most of the tracks.) The recording debuted at number one on the British album chart, and critics praised Adele’s supple phrasing, her tasteful arrangements, and her ability to channel her intimate emotional experiences (especially with heartbreak) into songs that had wide resonance. She also earned comparisons to Amy Winehouse, another young British singer conspicuously influenced by soul music. (For many fans, however, Adele’s zaftig figure and down-to-earth persona made her the more-relatable star.) A performance on the television program Saturday Night Live helped introduce Adele to American audiences, and in early 2009 she won Grammy Awards for best new artist and best female pop vocal performance (for the lush bluesy song β€œChasing Pavements”). For her next album, Adele enlisted a number of songwriters and producers, including Rick Rubin, to collaborate with her. The result, 21 (2011), was a bolder and more stylistically diverse set of material, with singles ranging from the earthy gospel- and disco-inflected β€œRolling in the Deep” to the affecting breakup ballad β€œSomeone like You.” Both songs hit number one in multiple countries, and, despite a vocal-cord ailment that forced Adele to cancel numerous tour dates in 2011, the album became the biggest-selling release of the year in both the United States and the United Kingdom. Additionally, with worldwide sales of more than 20 million copies by mid-2012, it was credited with helping revive the flagging recording industry. Following successful throat surgery, Adele performed at the 2012 Grammy Awards ceremony. She also collected six Grammy trophies, including those for album, record, and song of the year (the latter two honoured β€œRolling in the Deep”). Days later she received two Brit Awards (the British equivalent of the Grammys). The sales spike for 21 after both events further confirmed the singer’s emergence as a commercial juggernaut. In 2013 Adele won the Grammy for best pop solo performance for β€œSet Fire to the Rain,” from her concert album Live at the Royal Albert Hall (2011), and she picked up an Academy Award for the brassy theme song she provided for the blockbuster James Bond movie Skyfall (2012). Later that year she was named a Member of the Order of the British Empire (MBE). Adele returned in 2015 with the album 25. Although some critics felt it did not take enough risks, Adele’s voice was no less powerful, and her ability to sell records remained undiminished. The yearning single β€œHello” became a hit in numerous countries, and more than 20 million copies of the album were sold worldwide. In addition, 25 earned Adele five more Grammys, including another sweep of the top categories (album, song, and record of the year). In 2021 the singer released her fourth studio album, 30. The emotionally candid workβ€”many of the songs deal with her divorce and its aftermathβ€”was widely acclaimed, and the single β€œEasy on Me” won the Grammy for best pop solo performance.",
4
  "gender":"F"
5
  },
 
 
 
 
 
 
 
 
 
6
  "Cate Blanchett": {
7
  "knowledge": "Blanchett, (born May 14, 1969, Melbourne, Victoria, Australia), Australian actress known for her multidimensional characters and wide range of roles. Blanchett grew up in suburban Melbourne with an Australian mother and an American father, who died when Blanchett was 10 years old. She studied art history at the University of Melbourne before graduating from the National Institute of Dramatic Art in 1992. Her professional acting career began on the Australian stage. She performed with the Sydney Theatre Company in Caryl Churchill’s Top Girls and Timothy Daly’s Kafka Dances. In 1993 she starred opposite Geoffrey Rush in David Mamet’s Oleanna, as a student who accuses her teacher of sexual harassment. Blanchett made her television debut in 1993, and she soon landed leading roles in the miniseries Heartland (1994) and Bordertown (1995). She moved to feature films with Paradise Road (1997), a historical drama about a Japanese war camp in World War II. Blanchett’s reputation grew with her next two feature films: the bittersweet romantic comedy Thank God He Met Lizzie (1997; later released as The Wedding Party) and Oscar and Lucinda (1997), in which she played a rebellious heiress ostracized from Australian society. Her breakthrough role was as young Queen Elizabeth I in the 1998 film Elizabeth, which earned her an Academy Award nomination and a Golden Globe Award for best actress. Blanchett was praised for capturing the emotional complexity of the queen’s development from a lovestruck adolescent to an indomitable political force who represses her emotional vulnerability. Blanchett subsequently appeared in films that covered numerous genres and character types, securing her reputation as a versatile actress. She took supporting parts in Pushing Tin (1999), a comedy about air traffic controllers, and in the dramatic thriller The Talented Mr. Ripley (1999). As the lead character in The Gift (2000), she played a psychic whose visions involve her in the investigation of a local woman’s murder. In 2001 she portrayed a kidnapped housewife who falls in love with her captors in Bandits. She next appeared as the elf queen Galadriel in The Lord of the Rings trilogy (2001, 2002, and 2003), the film adaptations of J.R.R. Tolkien’s epic fantasy. In the western The Missing (2003), Blanchett brought her trademark complexity to the role of a young woman forced to confront her estranged father (played by Tommy Lee Jones) in order to reclaim her kidnapped daughter. She earned further critical acclaim for her performance as an Irish journalist who runs afoul of the mob in Veronica Guerin (2003). In 2004 she starred in Wes Anderson’s offbeat comedy The Life Aquatic with Steve Zissou, playing a pregnant reporter in a bizarre love triangle with the ship’s captain (played by Bill Murray) and someone who may be his son (played by Owen Wilson). Returning to her study of historical characters, Blanchett portrayed Hollywood star Katharine Hepburn in The Aviator (2004), Martin Scorsese’s biopic of the eccentric millionaire Howard Hughes, and won an Academy Award for the role. She later appeared in the dramas Babel (2006), The Good German (2006), and Notes on a Scandal (2006). In the unconventional biopic I’m Not There (2007), she starred as one of several characters based on the musician Bob Dylan at different stages in his life. As the character Jude, a star making the dramatic shift from acoustic folk to electric rock, Blanchett was praised for capturing the elusive and bewildering qualities attributed to Dylan. Her performance earned her another Academy Award nomination and a Golden Globe Award for best supporting actress. In 2007 Blanchett reprised her role as the English queen in Elizabeth: The Golden Age, which explores Elizabeth’s political battles with Spain and her personal relationship with Sir Walter Raleigh; she earned another Oscar nomination for her performance. The following year she played the Soviet villain Irina Spalko in Steven Spielberg’s Indiana Jones and the Kingdom of the Crystal Skull (2008), another addition to the series of action-adventure films following the dashing archaeologist. In 2008 she also starred opposite Brad Pitt in The Curious Case of Benjamin Button, a drama about a man who ages backward. Two years later she appeared as Marion Loxley in Ridley Scott’s Robin Hood. The action drama starred Russell Crowe in the title role as the outlaw hero. In the thriller Hanna (2011), Blanchett portrayed a CIA agent in pursuit of a former agent and his teenage daughter, whom he has trained to be an assassin. Blanchett again assumed the role of Galadriel in the Hobbit trilogyβ€”An Unexpected Journey (2012), The Desolation of Smaug (2013), and The Battle of the Five Armies (2014), all based on the Tolkien novel that preceded The Lord of the Rings. Her performance in Woody Allen’s Blue Jasmine (2013), as a socialite struggling to cope with a decline in circumstances, won her further acclaim, including an Oscar for best actress; she also received her third Golden Globe. She played a French art historian and Resistance member in The Monuments Men (2014), which fictionalized Allied efforts to recover art stolen by the Nazis during World War II. Blanchett then sank her teeth into the role of the wicked stepmother of the title character in Cinderella (2015). In Truth (2015) she played CBS producer Mary Mapes, who was fired after the accuracy of a segment by reporter Dan Rather on U.S. Pres. George W. Bush’s military service was called into question. Carol, a drama in which she played a married socialite who enters a romantic relationship with a younger store clerk (Rooney Mara), earned her a seventh Oscar nomination. She then joined the ensemble of Knight of Cups (2015), Terrence Malick’s experimental meditation on Hollywood, and later appeared in his film Song to Song (2017), a romantic drama set against the Austin, Texas, music scene. Also in 2017 Blanchett earned critical praise for her vivacious portrayal of Hela, the goddess of death, in Thor: Ragnarok. The next year she starred in Ocean’s 8, the female-driven reboot of the Ocean’s Eleven franchise from the early 2000s, and The House with a Clock in Its Walls, an adaptation of a 1973 children’s fantasy novel. Blanchett was then lauded for her guest appearance as a performance artist akin to Marina AbramoviΔ‡ on the mockumentary TV series Documentary Now! in 2019. That year she also played the eponymous character in Where’d You Go, Bernadette, a film based on the best-selling novel. Blanchett’s credits from 2020 included the TV miniseries Mrs. America, in which she portrayed the activist Phyllis Schlafly, who opposed the Equal Rights Amendment. In 2021 Blanchett appeared in the films Don’t Look Up, a dramedy about an impending comet strike that will destroy Earth, and Guillermo del Toro’s Nightmare Alley. In the latter, a film noir adapted from a novel by William Lindsay Gresham, the actress played a manipulative psychoanalyst who meets a scheming carnival worker (Bradley Cooper). Blanchett earned widespread acclaim for her performance in TΓ‘r (2022), a character study about a trailblazing conductor whose career is derailed by allegations of sexual misconduct. In addition to winning a Golden Globe, she also earned her eighth Oscar nomination. In addition to her film work, Blanchett remained active in the theatre. In 2008 she and her husband, writer Andrew Upton, became artistic directors of the Sydney Theatre Company. Blanchett left the position in 2013, though Upton remained. Her performances with the company included Hedda Gabler (2004) and The War of the Roses (2009). In 2017 she made her Broadway debut in The Present, which was based on a play by Anton Chekhov. For her performance, Blanchett received a Tony Award nomination.",
8
  "questions": [
@@ -51,7 +72,7 @@
51
  ],
52
  "gender": "F"
53
  },
54
- "David Beckham": {
55
  "knowledge": "Beckham, (born May 2, 1975, Leytonstone, East London, England), English football (soccer) player who gained international fame for his on-field play as well as for his highly publicized personal life. At age 11 Beckham won a football contest, and as a teenager he competed on Manchester United’s youth squad, leading it to a national championship in 1992. Three years later he began playing with the professional team in league competition, and during the 1995–96 season he helped Manchester United win the league title and the Football Association (FA) Cup. Beckham attracted national attention in August 1996 when he scored a goal from the halfway line (a feat roughly equivalent to a golfer’s hole in one). The following year Manchester United successfully defended its league title, and Beckham was voted Young Player of the Year. In the 1998–99 season Manchester United won the league title, the FA Cup, and the European Cup. Beckham was named best midfielder and Most Valuable Player. Considered one of the sport’s elite players, he was perhaps best known for his free kicks and crosses; the 2002 film Bend It Like Beckham paid homage to his kicking ability. After helping Manchester United win three more league titles (2000, 2001, and 2003), he left the team in 2003 to join the Spanish football club Real Madrid. Four years later he signed a record-setting deal with the Los Angeles Galaxy of Major League Soccer (MLS) in the United States. In October 2008 Beckham signed to play with Italian football powerhouse AC Milan during the MLS off-season. In 2011 he helped the Galaxy win an MLS Cup title. The Galaxy won a second MLS Cup title in 2012, and Beckham left the team at the end of the season. In 2013 he joined the French first-league team Paris Saint-Germain (PSG), and PSG won the French domestic title in his one season with the team. Beckham retired from football soon after winning his championship with PSG. In 1996 Beckham first played on England’s national team, in a World Cup qualifying match. At the 1998 World Cup he drew much criticism after he was ejected from a game for kicking an opponent. England lost the match and was eliminated from the competition. In 2000 Beckham was made captain of the national team. At the 2002 and 2006 World Cups, England was defeated in the quarterfinals. After the 2006 tournament, Beckham stepped down as captain, and he was later dropped from England’s national team. He was recalled to the team in 2007, and the following year he posted his 100th international appearance, becoming the fifth person to do so in the history of English football. Beckham was poised to be the first Englishman to appear in four World Cups, but he tore his Achilles tendon while playing for AC Milan in March 2010 and was ruled out for the 2010 tournament. A healthy but older Beckham was not selected for the English side at the 2012 European Championship, and he finished his national career with 115 international games played, the most in his country’s history for a non-goalkeeper. After his playing days ended, Beckham remained involved in soccer. He notably was the owner and president of the MLS team Inter Miami CF, which made its debut in 2020. In 1999 Beckham married singer Victoria Adams, best known as β€œPosh Spice” of the Spice Girls pop group, in a lavish ceremony. The intense media attention to the couple increased Beckham’s popularity around the world, as did his style of dress and ever-changing hairstyles. In 2003 he was made an Officer of the Order of the British Empire (OBE). He released an eponymous memoir in 2014.",
56
  "questions": [
57
  "When and where were you born?",
@@ -99,7 +120,13 @@
99
  ],
100
  "gender": "M"
101
  },
102
- "Emma Watson": {
 
 
 
 
 
 
103
  "knowledge": "Watson, (born April 15, 1990, Paris, France), British actress and activist who was perhaps best known for playing the young wizard Hermione Granger in the Harry Potter films. She also garnered attention as a spokesperson for women’s equality. Watson was born in Paris to British parents who divorced when she was young. She and her brother went to live with their mother in Oxfordshire, England. While a child, Watson decided she wanted to be an actress. Besides attending school, she took acting and singing classes. She also appeared in several school plays. Watson began acting in earnest in 1999 after she auditioned for a part in the film adaptation of J.K. Rowling’s Harry Potter and the Sorcerer’s Stone (2001). She won the role of smart and logical Hermione, one of Harry Potter’s best friends. The film was a box-office hit, and Watson reprised her role in the franchise’s other movies: Harry Potter and the Chamber of Secrets (2002), Harry Potter and the Prisoner of Azkaban (2004), Harry Potter and the Goblet of Fire (2005), Harry Potter and the Order of the Phoenix (2007), Harry Potter and the Half-Blood Prince (2009), Harry Potter and the Deathly Hallows: Part 1 (2010), and Harry Potter and the Deathly Hallows: Part 2 (2011). After the Potter films ended, Watson began to look for more mature roles. Her first major part was in the drama The Perks of Being a Wallflower (2012), in which she played a high-school senior who becomes friends with a clinically depressed freshman. She subsequently appeared in the crime drama The Bling Ring (2013), the historical thriller The Colony (also known as Colonia; 2015), and the sci-fi thriller The Circle (2017). These films had limited success at the box-office, but Watson had another blockbuster hit with the live-action Disney adaptation (2017) of Beauty and the Beast. In 2019 she appeared as Meg March in Greta Gerwig’s acclaimed Little Women, which was based on Louisa May Alcott’s classic children’s book. Meanwhile, in the midst of her acting career, Watson pursued a college degree. In 2009 she began attending Brown University in Providence, Rhode Island. She took time off as needed for filming, and she also studied for a year at the University of Oxford. Watson graduated from Brown in 2014 with a bachelor’s degree in English literature. That year she was named a UN Women Goodwill Ambassador. She was an advocate for women’s rights and gender equality. From 2016 to 2020 Watson ran an online feminist book club, Our Shared Shelf, to read and discuss books by and about women.",
104
  "questions": [
105
  "When and where were you born?",
@@ -147,6 +174,36 @@
147
  ],
148
  "gender": "F"
149
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  "Lady Gaga":{
151
  "knowledge": "Lady Gaga, (born March 28, 1986, New York City, New York, U.S.), American singer-songwriter and performance artist, known for her flamboyant costumes, provocative lyrics, and strong vocal talents, who achieved enormous popular success with songs such as β€œJust Dance,” β€œBad Romance,” and β€œBorn This Way.” Germanotta was born into an Italian American family in New York City. She learned music at an early age and was performing onstage in New York City clubs by the time she was a teenager. She attended an all-girls school, Convent of the Sacred Heart, in Manhattan before going on to study music at the Tisch School of the Arts at New York University. She studied at Tisch for two years before dropping out to manage her own career. After dropping out, she began transforming herself from Germanotta into Lady Gaga, whose style combined glam rock and over-the-top fashion design. In 2007 she and performance artist Lady Starlight formed a revue called the Ultimate Pop Burlesque Rockshow. That same year Lady Gaga, who also wrote songs for other pop artists such as Fergie, the Pussycat Dolls, and Britney Spears, was signed by the singer Akon to Interscope Records and began preparing her debut album, The Fame, which was released in 2008. Although she modeled herself on such theatrical performers as David Bowie during his Ziggy Stardust period, the New York Dolls, Grace Slick, and Freddie Mercuryβ€”her adopted stage name was derived from Queen’s song β€œRadio Ga Ga”—she created a character that came to occupy a unique space in the music world. Her fashion combined with her up-tempo, synthetic dance music and her edgy, theatrical performance to create stunning sounds and visuals. Indeed, while producing music, Lady Gaga also created her own sexually charged fashionsβ€”replete with dazzling wigs and space-age bodysuitsβ€”through her creative team Haus of Gaga. Her first single, β€œJust Dance,” became popular in clubs throughout the United States and Europe and eventually landed at number one on the Billboard Pop Songs chart (also called the radio chart). Three other singles off The Fameβ€”β€œPoker Face,” β€œLoveGame,” and β€œPaparazzi”—also reached number one on the radio chart, making Lady Gaga the first artist in the 17-year history of that chart to have four number ones from a debut album. The Fame was well received critically and proved enormously successful commercially, selling more than eight million copies worldwide by the end of 2009. The album also yielded Lady Gaga five Grammy nominations, including for album of the year and song of the year (β€œPoker Face”); she captured two Grammysβ€”best dance recording (β€œPoker Face”) and best electronic/dance album (The Fame)β€”and her opening duet with Sir Elton John was among the most talked-about elements of the 2010 Grammys telecast. In February 2010 she also picked up three Brit Awards (the British equivalent of the Grammys)β€”for best international female, best album, and breakthrough act. Her second album, The Fame Monster, was released in November 2009 (it was originally conceived as a bonus disc) and almost instantly produced another hit, β€œBad Romance.” Other popular singles from the album followed, including β€œTelephone” (which featured BeyoncΓ©, as did a nine-minute video produced by Jonas Γ…kerlund starring the pair and referencing Quentin Tarantino’s film Kill Bill: Vol. 1 [2003]) and β€œAlejandro.” During 2010 Lady Gaga proved to be one of the most commercially successful artists, with a sold-out concert tour (which had been launched to coincide with the release of The Fame Monster), while she also headlined Chicago’s Lollapalooza music festival and played in front of a record 20,000 people at NBC’s Today show. She was named one of Time magazine’s 100 Most Influential People and was named by Forbes magazine as one of the world’s most powerful women, and she capped off 2010 by being named Billboard magazine’s artist of the year. After arriving at the 2011 Grammy Awards ceremony encased in a giant egg, Lady Gaga went on to claim honours for best pop vocal album (for The Fame Monster) and best female pop vocal performance and best short form video (for β€œBad Romance”). Lady Gaga’s third album, Born This Way (2011), found the entertainer reaching back to earlier musical eras for inspiration. As a blonde dance-pop performer with a penchant for provocation, Lady Gaga had often earned comparisons to the singer Madonna, and on the album’s first two singles the similarities were especially pronounced. The title track was a self-empowerment anthem in the style of Madonna’s 1989 single β€œExpress Yourself,” while β€œJudas” brazenly mixed sexual and religious imagery. Both songs quickly became hits. Other tracks on the album featured guest appearances from guitarist Brian May of Queen and saxophonist Clarence Clemons of Bruce Springsteen’s E Street Band. In 2013 Lady Gaga released Artpop. Although the energetic lead single β€œApplause” extended her string of chart successes, the album was perceived as a commercial disappointment. She came back the following year with Cheek to Cheek, a collection of standards that she recorded with Tony Bennett. The recording topped the Billboard 200 as well as the jazz and traditional jazz album charts, and it earned the Grammy for best traditional pop vocal album. The duo also won that award for their second collaboration, Love for Sale (2021), a tribute album to Cole Porter. During this time Lady Gaga continued to record solo albums. The relatively understated Joanne (2016) performed poorly until Lady Gaga’s halftime Super Bowl performance in February 2017 brought it favourable attention. For her sixth studio album, Chromatica (2020), Lady Gaga returned to her earlier music, mixing disco and electronic-pop. In addition to recording music, Lady Gaga made occasional film appearances, notably in Machete Kills (2013) and Sin City: A Dame to Kill For (2014). She played a vampiric countess with no regard for life or suffering in the fifth season of the television show American Horror Story: Hotel (2015–16). For her performance in the anthology series, Lady Gaga received a Golden Globe Award. She also appeared in the sixth season, which aired in 2016. Lady Gaga garnered critical acclaim and an Academy Award nomination for her first lead role, a guileless up-and-coming singer-songwriter in the 2018 remake of the movie A Star Is Born. She cowrote most of that movie’s songs, many of which she performed with costar and director Bradley Cooper. The lead single, β€œShallow,” won two Grammy Awards and the Oscar for best original song. In 2021 Lady Gaga appeared in Ridley Scott’s House of Gucci, which centres on the true story of the murder of Maurizio Gucci, who headed his family’s luxury fashion brand. Lady Gaga also contributed songs to other films. She notably cowrote and performed β€œTil It Happens to You” for the documentary The Hunting Ground (2015) and β€œHold My Hand” for Top Gun: Maverick (2022). Both tracks received Oscar nominations for best original song. Lady Gaga cultivated a devoted following, particularly among gay men (she acknowledged her own bisexuality), who became some of her most loyal fans. She became particularly outspoken on gay rights, especially same-sex marriage, and was a featured speaker at the 2009 National Equality March in Washington, D.C. In 2021 Lady Gaga sang the national anthem at the U.S. presidential inauguration of Joe Biden.",
152
  "questions": [
@@ -195,6 +252,9 @@
195
  ],
196
  "gender": "F"
197
  },
 
 
 
198
  "Madonna":{
199
  "knowledge": "Madonna, (born August 16, 1958, Bay City, Michigan, U.S.), American singer, songwriter, actress, and entrepreneur whose immense popularity in the 1980s and ’90s allowed her to achieve levels of power and control that were nearly unprecedented for a woman in the entertainment industry. Born into a large Italian American family, Madonna studied dance at the University of Michigan and with the Alvin Ailey American Dance Theater in New York City in the late 1970s before relocating briefly to Paris as a member of Patrick Hernandez’s disco revue. Returning to New York City, she performed with a number of rock groups before signing with Sire Records. Her first hit, β€œHoliday,” in 1983, provided the blueprint for her later materialβ€”an upbeat dance club sound with sharp production and an immediate appeal. Madonna’s melodic pop incorporated catchy choruses, and her lyrics concerned love, sex, and relationshipsβ€”ranging from the breezy innocence of β€œTrue Blue” (1986) to the erotic fantasies of β€œJustify My Love” (1990) to the spirituality of later songs such as β€œRay of Light” (1998). Criticized by some as being limited in range, her sweet girlish voice nonetheless was well suited to pop music. Madonna was the first female artist to exploit fully the potential of the music video. She collaborated with top designers (Jean-Paul Gaultier), photographers (Steven Meisel and Herb Ritts), and directors (Mary Lambert and David Fincher), drawing inspiration from underground club culture or the avant-garde to create distinctive sexual and satirical imagesβ€”from the knowing ingenue of β€œLike a Virgin” (1984) to the controversial red-dressed β€œsinner” who kisses a Black saint in β€œLike a Prayer” (1989). By 1991 she had scored 21 top ten hits in the United States and sold some 70 million albums internationally, generating $1.2 billion in sales. Committed to controlling her image and career herself, Madonna became the head of Maverick, a subsidiary of Time Warner created by the entertainment giant as part of a $60 million deal with the performer. Her success signaled a clear message of financial control to other women in the industry, but in terms of image she was a more ambivalent role model. In 1992 Madonna took her role as a sexual siren to its full extent when she published Sex, a soft-core pornographic coffee-table book featuring her in a variety of β€œerotic” poses. She was criticized for being exploitative and overcalculating, and writer Norman Mailer said she had become β€œsecretary to herself.” Soon afterward Madonna temporarily withdrew from pop music to concentrate on a film career that had begun with a strong performance in Desperately Seeking Susan (1985), faltered with the flimsy Shanghai Surprise (1986) and Dick Tracy (1990), and recovered with Truth or Dare (1991, also known as In Bed with Madonna), a documentary of one of her tours, and A League of Their Own (1992). She scored massive success in 1996 with the starring role in the film musical Evita. That year she also gave birth to a daughter. In 1998 Madonna released her first album of new material in four years, Ray of Light. A fusion of techno music and self-conscious lyrics, it was a commercial and critical success, earning the singer her first musical Grammy Awards, among them the award for best pop album (her previous win had been for a video). She won another Grammy the following year, for the song β€œBeautiful Stranger,” which she cowrote and performed for the movie Austin Powers: The Spy Who Shagged Me (1999). Her experimentation in electronica continued with Music (2000). In 2005 she returned to her roots with Confessions on a Dance Floor, which took the Grammy for best electronic/dance album. Despite a marriage in the 1980s to actor Sean Penn and another to English director Guy Ritchie (married 2000; divorced 2008), with whom she had a son, Madonna remained resolutely independent. (She also later adopted four children from Malawi.) That independent streak, however, did not prevent her from enlisting the biggest names in music to assist on specific projects. This fact was clear on Hard Candy (2008), a hip-hop-infused effort with writing and vocal and production work by Justin Timberlake, Timbaland, and Pharrell Williams of the hit-making duo the Neptunes. With MDNA (2012), which featured cameos from rappers M.I.A. and Nicki Minaj, she continued to prove herself a shrewd assimilator of cutting-edge musical styles. Rebel Heart (2015), featuring production work by Diplo and Kanye West and guest appearances from Minaj and Chance the Rapper, was an ode to her career. In 2019 Madonna released her 14th studio album, Madame X, which was inspired by her 2017 move to Lisbon, Portugal, and contained music influenced by Latin pop, art pop, and hip-hop. Madonna was inducted into the Rock and Roll Hall of Fame in 2008. In addition to acting in moviesβ€”she also starred in the romantic comedy The Next Best Thing (2000) and in Ritchie’s Swept Away (2002)β€”Madonna pursued work behind the camera. She cowrote and directed Filth and Wisdom (2008), a comedy about a trio of mismatched flatmates in London, as well as the drama W.E. (2011), which juxtaposed the historical romance between Wallis Simpson and King Edward VIII with the fictional story of a woman in the 1990s researching Simpson’s life.",
200
  "questions": [
@@ -242,8 +302,8 @@
242
  "The focus of my 2015 album 'Rebel Heart' was an ode to my career."
243
  ],
244
  "gender": "F"
245
- },
246
- "Mark Zuckerberg":{
247
  "knowledge": "Zuckerberg, (born May 14, 1984, White Plains, New York, U.S.), American computer programmer who was cofounder and CEO (2004– ) of Facebook, a social networking website. After attending Phillips Exeter Academy, Zuckerberg enrolled at Harvard University in 2002. On February 4, 2004, he launched thefacebook dot com (renamed Facebook in 2005), a directory in which fellow Harvard students entered their own information and photos into a template that he had devised. Within two weeks half of the student body had signed up. Zuckerberg’s roommates, Dustin Moskovitz and Chris Hughes, helped him add features and make the site available to other campuses across the country. Facebook quickly became popular as registered users could create profiles, upload photos and other media, and keep in touch with friends. It differed from other social networking sites, however, in its emphasis on real names (and e-mail addresses), or β€œtrusted connections.” It also laid particular emphasis on networking, with information disseminated not only to each individual’s network of friends but also to friends of friendsβ€”what Zuckerberg called the β€œsocial graph.” In the summer of 2004 the trio moved their headquarters to Palo Alto, California, where Zuckerberg talked venture capitalist Peter Thiel into giving them seed money. Zuckerberg dropped out of Harvard to concentrate on the fledgling company, of which he became CEO and president. In May 2005 Facebook received its first major infusion of venture capital ($12.7 million). Four months later Facebook opened to registration by high-school students. Meanwhile, foreign colleges and universities also began to sign up, and by September 2006 anyone with an e-mail address could join a regional network based on where he or she lived. About that time Zuckerberg turned down a $1 billion buyout offer from Yahoo!, but in 2007 Facebook struck a deal with Microsoft in which the software company paid $240 million for a 1.6 percent stake in Facebook; two years later Digital Sky Technologies purchased a 1.96 percent share for $200 million. In 2008 Zuckerberg’s new worth was estimated at about $1.5 billion. After Facebook’s initial public offering (IPO) of stock in 2012, Zuckerberg’s net worth was estimated at more than $19 billion. In October 2021 Facebook announced that it was changing the name of its parent company to Meta Platforms. The name change reflected an emphasis on the β€œmetaverse”, in which users would interact in virtual reality environments.",
248
  "questions": [
249
  "When and where were you born?",
@@ -290,5 +350,56 @@
290
  "Yahoo! made the offer."
291
  ],
292
  "gender": "M"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
293
  }
294
  }
 
1
  {
2
+ "Angelina Jolie": {
3
+ "gender": "F"
4
+ },
5
+ "Anne Hathaway": {
6
+ "gender": "F"
7
+ },
8
+ "Ariana Grande": {
9
+ "gender": "F"
10
+ },
11
+ "Arnold Schwarzenegger": {
12
+ "gender": "M"
13
+ },
14
  "Adele": {
15
  "knowledge": "Adele, (born May 5, 1988, Tottenham, London, England), English pop singer and songwriter whose soulful emotive voice and traditionally crafted songs made her one of the most broadly popular performers of her generation. Adkins was raised by a young single mother in various working-class neighbourhoods of London. As a child, she enjoyed singing contemporary pop music and learned to play the guitar and the clarinet. However, it was not until her early teens, when she discovered rhythm-and-blues singer Etta James and other mid-20th-century performers, that she began to consider a musical career. While she honed her talents at a government-funded secondary school for the performing arts, a friend began posting songs Adkins had written and recorded onto the social networking Web site Myspace. Her music eventually caught the attention of record labels, and in 2006, several months after graduating, she signed a contract with XL Recordings.After building anticipation in Britain with some well-received live performances, Adele (as she now billed herself) released her first album, 19, in 2008. (The title referred to the age at which she penned most of the tracks.) The recording debuted at number one on the British album chart, and critics praised Adele’s supple phrasing, her tasteful arrangements, and her ability to channel her intimate emotional experiences (especially with heartbreak) into songs that had wide resonance. She also earned comparisons to Amy Winehouse, another young British singer conspicuously influenced by soul music. (For many fans, however, Adele’s zaftig figure and down-to-earth persona made her the more-relatable star.) A performance on the television program Saturday Night Live helped introduce Adele to American audiences, and in early 2009 she won Grammy Awards for best new artist and best female pop vocal performance (for the lush bluesy song β€œChasing Pavements”). For her next album, Adele enlisted a number of songwriters and producers, including Rick Rubin, to collaborate with her. The result, 21 (2011), was a bolder and more stylistically diverse set of material, with singles ranging from the earthy gospel- and disco-inflected β€œRolling in the Deep” to the affecting breakup ballad β€œSomeone like You.” Both songs hit number one in multiple countries, and, despite a vocal-cord ailment that forced Adele to cancel numerous tour dates in 2011, the album became the biggest-selling release of the year in both the United States and the United Kingdom. Additionally, with worldwide sales of more than 20 million copies by mid-2012, it was credited with helping revive the flagging recording industry. Following successful throat surgery, Adele performed at the 2012 Grammy Awards ceremony. She also collected six Grammy trophies, including those for album, record, and song of the year (the latter two honoured β€œRolling in the Deep”). Days later she received two Brit Awards (the British equivalent of the Grammys). The sales spike for 21 after both events further confirmed the singer’s emergence as a commercial juggernaut. In 2013 Adele won the Grammy for best pop solo performance for β€œSet Fire to the Rain,” from her concert album Live at the Royal Albert Hall (2011), and she picked up an Academy Award for the brassy theme song she provided for the blockbuster James Bond movie Skyfall (2012). Later that year she was named a Member of the Order of the British Empire (MBE). Adele returned in 2015 with the album 25. Although some critics felt it did not take enough risks, Adele’s voice was no less powerful, and her ability to sell records remained undiminished. The yearning single β€œHello” became a hit in numerous countries, and more than 20 million copies of the album were sold worldwide. In addition, 25 earned Adele five more Grammys, including another sweep of the top categories (album, song, and record of the year). In 2021 the singer released her fourth studio album, 30. The emotionally candid workβ€”many of the songs deal with her divorce and its aftermathβ€”was widely acclaimed, and the single β€œEasy on Me” won the Grammy for best pop solo performance.",
16
  "gender":"F"
17
  },
18
+ "Barack Obama": {
19
+ "gender": "M"
20
+ },
21
+ "Beyonce": {
22
+ "gender": "F"
23
+ },
24
+ "Britney Spears": {
25
+ "gender": "F"
26
+ },
27
  "Cate Blanchett": {
28
  "knowledge": "Blanchett, (born May 14, 1969, Melbourne, Victoria, Australia), Australian actress known for her multidimensional characters and wide range of roles. Blanchett grew up in suburban Melbourne with an Australian mother and an American father, who died when Blanchett was 10 years old. She studied art history at the University of Melbourne before graduating from the National Institute of Dramatic Art in 1992. Her professional acting career began on the Australian stage. She performed with the Sydney Theatre Company in Caryl Churchill’s Top Girls and Timothy Daly’s Kafka Dances. In 1993 she starred opposite Geoffrey Rush in David Mamet’s Oleanna, as a student who accuses her teacher of sexual harassment. Blanchett made her television debut in 1993, and she soon landed leading roles in the miniseries Heartland (1994) and Bordertown (1995). She moved to feature films with Paradise Road (1997), a historical drama about a Japanese war camp in World War II. Blanchett’s reputation grew with her next two feature films: the bittersweet romantic comedy Thank God He Met Lizzie (1997; later released as The Wedding Party) and Oscar and Lucinda (1997), in which she played a rebellious heiress ostracized from Australian society. Her breakthrough role was as young Queen Elizabeth I in the 1998 film Elizabeth, which earned her an Academy Award nomination and a Golden Globe Award for best actress. Blanchett was praised for capturing the emotional complexity of the queen’s development from a lovestruck adolescent to an indomitable political force who represses her emotional vulnerability. Blanchett subsequently appeared in films that covered numerous genres and character types, securing her reputation as a versatile actress. She took supporting parts in Pushing Tin (1999), a comedy about air traffic controllers, and in the dramatic thriller The Talented Mr. Ripley (1999). As the lead character in The Gift (2000), she played a psychic whose visions involve her in the investigation of a local woman’s murder. In 2001 she portrayed a kidnapped housewife who falls in love with her captors in Bandits. She next appeared as the elf queen Galadriel in The Lord of the Rings trilogy (2001, 2002, and 2003), the film adaptations of J.R.R. Tolkien’s epic fantasy. In the western The Missing (2003), Blanchett brought her trademark complexity to the role of a young woman forced to confront her estranged father (played by Tommy Lee Jones) in order to reclaim her kidnapped daughter. She earned further critical acclaim for her performance as an Irish journalist who runs afoul of the mob in Veronica Guerin (2003). In 2004 she starred in Wes Anderson’s offbeat comedy The Life Aquatic with Steve Zissou, playing a pregnant reporter in a bizarre love triangle with the ship’s captain (played by Bill Murray) and someone who may be his son (played by Owen Wilson). Returning to her study of historical characters, Blanchett portrayed Hollywood star Katharine Hepburn in The Aviator (2004), Martin Scorsese’s biopic of the eccentric millionaire Howard Hughes, and won an Academy Award for the role. She later appeared in the dramas Babel (2006), The Good German (2006), and Notes on a Scandal (2006). In the unconventional biopic I’m Not There (2007), she starred as one of several characters based on the musician Bob Dylan at different stages in his life. As the character Jude, a star making the dramatic shift from acoustic folk to electric rock, Blanchett was praised for capturing the elusive and bewildering qualities attributed to Dylan. Her performance earned her another Academy Award nomination and a Golden Globe Award for best supporting actress. In 2007 Blanchett reprised her role as the English queen in Elizabeth: The Golden Age, which explores Elizabeth’s political battles with Spain and her personal relationship with Sir Walter Raleigh; she earned another Oscar nomination for her performance. The following year she played the Soviet villain Irina Spalko in Steven Spielberg’s Indiana Jones and the Kingdom of the Crystal Skull (2008), another addition to the series of action-adventure films following the dashing archaeologist. In 2008 she also starred opposite Brad Pitt in The Curious Case of Benjamin Button, a drama about a man who ages backward. Two years later she appeared as Marion Loxley in Ridley Scott’s Robin Hood. The action drama starred Russell Crowe in the title role as the outlaw hero. In the thriller Hanna (2011), Blanchett portrayed a CIA agent in pursuit of a former agent and his teenage daughter, whom he has trained to be an assassin. Blanchett again assumed the role of Galadriel in the Hobbit trilogyβ€”An Unexpected Journey (2012), The Desolation of Smaug (2013), and The Battle of the Five Armies (2014), all based on the Tolkien novel that preceded The Lord of the Rings. Her performance in Woody Allen’s Blue Jasmine (2013), as a socialite struggling to cope with a decline in circumstances, won her further acclaim, including an Oscar for best actress; she also received her third Golden Globe. She played a French art historian and Resistance member in The Monuments Men (2014), which fictionalized Allied efforts to recover art stolen by the Nazis during World War II. Blanchett then sank her teeth into the role of the wicked stepmother of the title character in Cinderella (2015). In Truth (2015) she played CBS producer Mary Mapes, who was fired after the accuracy of a segment by reporter Dan Rather on U.S. Pres. George W. Bush’s military service was called into question. Carol, a drama in which she played a married socialite who enters a romantic relationship with a younger store clerk (Rooney Mara), earned her a seventh Oscar nomination. She then joined the ensemble of Knight of Cups (2015), Terrence Malick’s experimental meditation on Hollywood, and later appeared in his film Song to Song (2017), a romantic drama set against the Austin, Texas, music scene. Also in 2017 Blanchett earned critical praise for her vivacious portrayal of Hela, the goddess of death, in Thor: Ragnarok. The next year she starred in Ocean’s 8, the female-driven reboot of the Ocean’s Eleven franchise from the early 2000s, and The House with a Clock in Its Walls, an adaptation of a 1973 children’s fantasy novel. Blanchett was then lauded for her guest appearance as a performance artist akin to Marina AbramoviΔ‡ on the mockumentary TV series Documentary Now! in 2019. That year she also played the eponymous character in Where’d You Go, Bernadette, a film based on the best-selling novel. Blanchett’s credits from 2020 included the TV miniseries Mrs. America, in which she portrayed the activist Phyllis Schlafly, who opposed the Equal Rights Amendment. In 2021 Blanchett appeared in the films Don’t Look Up, a dramedy about an impending comet strike that will destroy Earth, and Guillermo del Toro’s Nightmare Alley. In the latter, a film noir adapted from a novel by William Lindsay Gresham, the actress played a manipulative psychoanalyst who meets a scheming carnival worker (Bradley Cooper). Blanchett earned widespread acclaim for her performance in TΓ‘r (2022), a character study about a trailblazing conductor whose career is derailed by allegations of sexual misconduct. In addition to winning a Golden Globe, she also earned her eighth Oscar nomination. In addition to her film work, Blanchett remained active in the theatre. In 2008 she and her husband, writer Andrew Upton, became artistic directors of the Sydney Theatre Company. Blanchett left the position in 2013, though Upton remained. Her performances with the company included Hedda Gabler (2004) and The War of the Roses (2009). In 2017 she made her Broadway debut in The Present, which was based on a play by Anton Chekhov. For her performance, Blanchett received a Tony Award nomination.",
29
  "questions": [
 
72
  ],
73
  "gender": "F"
74
  },
75
+ "David Beckham": {
76
  "knowledge": "Beckham, (born May 2, 1975, Leytonstone, East London, England), English football (soccer) player who gained international fame for his on-field play as well as for his highly publicized personal life. At age 11 Beckham won a football contest, and as a teenager he competed on Manchester United’s youth squad, leading it to a national championship in 1992. Three years later he began playing with the professional team in league competition, and during the 1995–96 season he helped Manchester United win the league title and the Football Association (FA) Cup. Beckham attracted national attention in August 1996 when he scored a goal from the halfway line (a feat roughly equivalent to a golfer’s hole in one). The following year Manchester United successfully defended its league title, and Beckham was voted Young Player of the Year. In the 1998–99 season Manchester United won the league title, the FA Cup, and the European Cup. Beckham was named best midfielder and Most Valuable Player. Considered one of the sport’s elite players, he was perhaps best known for his free kicks and crosses; the 2002 film Bend It Like Beckham paid homage to his kicking ability. After helping Manchester United win three more league titles (2000, 2001, and 2003), he left the team in 2003 to join the Spanish football club Real Madrid. Four years later he signed a record-setting deal with the Los Angeles Galaxy of Major League Soccer (MLS) in the United States. In October 2008 Beckham signed to play with Italian football powerhouse AC Milan during the MLS off-season. In 2011 he helped the Galaxy win an MLS Cup title. The Galaxy won a second MLS Cup title in 2012, and Beckham left the team at the end of the season. In 2013 he joined the French first-league team Paris Saint-Germain (PSG), and PSG won the French domestic title in his one season with the team. Beckham retired from football soon after winning his championship with PSG. In 1996 Beckham first played on England’s national team, in a World Cup qualifying match. At the 1998 World Cup he drew much criticism after he was ejected from a game for kicking an opponent. England lost the match and was eliminated from the competition. In 2000 Beckham was made captain of the national team. At the 2002 and 2006 World Cups, England was defeated in the quarterfinals. After the 2006 tournament, Beckham stepped down as captain, and he was later dropped from England’s national team. He was recalled to the team in 2007, and the following year he posted his 100th international appearance, becoming the fifth person to do so in the history of English football. Beckham was poised to be the first Englishman to appear in four World Cups, but he tore his Achilles tendon while playing for AC Milan in March 2010 and was ruled out for the 2010 tournament. A healthy but older Beckham was not selected for the English side at the 2012 European Championship, and he finished his national career with 115 international games played, the most in his country’s history for a non-goalkeeper. After his playing days ended, Beckham remained involved in soccer. He notably was the owner and president of the MLS team Inter Miami CF, which made its debut in 2020. In 1999 Beckham married singer Victoria Adams, best known as β€œPosh Spice” of the Spice Girls pop group, in a lavish ceremony. The intense media attention to the couple increased Beckham’s popularity around the world, as did his style of dress and ever-changing hairstyles. In 2003 he was made an Officer of the Order of the British Empire (OBE). He released an eponymous memoir in 2014.",
77
  "questions": [
78
  "When and where were you born?",
 
120
  ],
121
  "gender": "M"
122
  },
123
+ "Denzel Washington": {
124
+ "gender": "M"
125
+ },
126
+ "George Clooney": {
127
+ "gender": "M"
128
+ },
129
+ "Emma Watson": {
130
  "knowledge": "Watson, (born April 15, 1990, Paris, France), British actress and activist who was perhaps best known for playing the young wizard Hermione Granger in the Harry Potter films. She also garnered attention as a spokesperson for women’s equality. Watson was born in Paris to British parents who divorced when she was young. She and her brother went to live with their mother in Oxfordshire, England. While a child, Watson decided she wanted to be an actress. Besides attending school, she took acting and singing classes. She also appeared in several school plays. Watson began acting in earnest in 1999 after she auditioned for a part in the film adaptation of J.K. Rowling’s Harry Potter and the Sorcerer’s Stone (2001). She won the role of smart and logical Hermione, one of Harry Potter’s best friends. The film was a box-office hit, and Watson reprised her role in the franchise’s other movies: Harry Potter and the Chamber of Secrets (2002), Harry Potter and the Prisoner of Azkaban (2004), Harry Potter and the Goblet of Fire (2005), Harry Potter and the Order of the Phoenix (2007), Harry Potter and the Half-Blood Prince (2009), Harry Potter and the Deathly Hallows: Part 1 (2010), and Harry Potter and the Deathly Hallows: Part 2 (2011). After the Potter films ended, Watson began to look for more mature roles. Her first major part was in the drama The Perks of Being a Wallflower (2012), in which she played a high-school senior who becomes friends with a clinically depressed freshman. She subsequently appeared in the crime drama The Bling Ring (2013), the historical thriller The Colony (also known as Colonia; 2015), and the sci-fi thriller The Circle (2017). These films had limited success at the box-office, but Watson had another blockbuster hit with the live-action Disney adaptation (2017) of Beauty and the Beast. In 2019 she appeared as Meg March in Greta Gerwig’s acclaimed Little Women, which was based on Louisa May Alcott’s classic children’s book. Meanwhile, in the midst of her acting career, Watson pursued a college degree. In 2009 she began attending Brown University in Providence, Rhode Island. She took time off as needed for filming, and she also studied for a year at the University of Oxford. Watson graduated from Brown in 2014 with a bachelor’s degree in English literature. That year she was named a UN Women Goodwill Ambassador. She was an advocate for women’s rights and gender equality. From 2016 to 2020 Watson ran an online feminist book club, Our Shared Shelf, to read and discuss books by and about women.",
131
  "questions": [
132
  "When and where were you born?",
 
174
  ],
175
  "gender": "F"
176
  },
177
+ "Ellen DeGeneres": {
178
+ "gender": "F"
179
+ },
180
+ "Gisele Bundchen": {
181
+ "gender": "F"
182
+ },
183
+ "Helen Mirren": {
184
+ "gender": "F"
185
+ },
186
+ "Jackie Chan": {
187
+ "gender": "M"
188
+ },
189
+ "Jennifer Aniston": {
190
+ "gender": "F"
191
+ },
192
+ "Jennifer Lawrence": {
193
+ "gender": "F"
194
+ },
195
+ "Jennifer Lopez": {
196
+ "gender": "F"
197
+ },
198
+ "Julia Roberts": {
199
+ "gender": "F"
200
+ },
201
+ "Katy Perry": {
202
+ "gender": "F"
203
+ },
204
+ "Kim Kardashian": {
205
+ "gender": "F"
206
+ },
207
  "Lady Gaga":{
208
  "knowledge": "Lady Gaga, (born March 28, 1986, New York City, New York, U.S.), American singer-songwriter and performance artist, known for her flamboyant costumes, provocative lyrics, and strong vocal talents, who achieved enormous popular success with songs such as β€œJust Dance,” β€œBad Romance,” and β€œBorn This Way.” Germanotta was born into an Italian American family in New York City. She learned music at an early age and was performing onstage in New York City clubs by the time she was a teenager. She attended an all-girls school, Convent of the Sacred Heart, in Manhattan before going on to study music at the Tisch School of the Arts at New York University. She studied at Tisch for two years before dropping out to manage her own career. After dropping out, she began transforming herself from Germanotta into Lady Gaga, whose style combined glam rock and over-the-top fashion design. In 2007 she and performance artist Lady Starlight formed a revue called the Ultimate Pop Burlesque Rockshow. That same year Lady Gaga, who also wrote songs for other pop artists such as Fergie, the Pussycat Dolls, and Britney Spears, was signed by the singer Akon to Interscope Records and began preparing her debut album, The Fame, which was released in 2008. Although she modeled herself on such theatrical performers as David Bowie during his Ziggy Stardust period, the New York Dolls, Grace Slick, and Freddie Mercuryβ€”her adopted stage name was derived from Queen’s song β€œRadio Ga Ga”—she created a character that came to occupy a unique space in the music world. Her fashion combined with her up-tempo, synthetic dance music and her edgy, theatrical performance to create stunning sounds and visuals. Indeed, while producing music, Lady Gaga also created her own sexually charged fashionsβ€”replete with dazzling wigs and space-age bodysuitsβ€”through her creative team Haus of Gaga. Her first single, β€œJust Dance,” became popular in clubs throughout the United States and Europe and eventually landed at number one on the Billboard Pop Songs chart (also called the radio chart). Three other singles off The Fameβ€”β€œPoker Face,” β€œLoveGame,” and β€œPaparazzi”—also reached number one on the radio chart, making Lady Gaga the first artist in the 17-year history of that chart to have four number ones from a debut album. The Fame was well received critically and proved enormously successful commercially, selling more than eight million copies worldwide by the end of 2009. The album also yielded Lady Gaga five Grammy nominations, including for album of the year and song of the year (β€œPoker Face”); she captured two Grammysβ€”best dance recording (β€œPoker Face”) and best electronic/dance album (The Fame)β€”and her opening duet with Sir Elton John was among the most talked-about elements of the 2010 Grammys telecast. In February 2010 she also picked up three Brit Awards (the British equivalent of the Grammys)β€”for best international female, best album, and breakthrough act. Her second album, The Fame Monster, was released in November 2009 (it was originally conceived as a bonus disc) and almost instantly produced another hit, β€œBad Romance.” Other popular singles from the album followed, including β€œTelephone” (which featured BeyoncΓ©, as did a nine-minute video produced by Jonas Γ…kerlund starring the pair and referencing Quentin Tarantino’s film Kill Bill: Vol. 1 [2003]) and β€œAlejandro.” During 2010 Lady Gaga proved to be one of the most commercially successful artists, with a sold-out concert tour (which had been launched to coincide with the release of The Fame Monster), while she also headlined Chicago’s Lollapalooza music festival and played in front of a record 20,000 people at NBC’s Today show. She was named one of Time magazine’s 100 Most Influential People and was named by Forbes magazine as one of the world’s most powerful women, and she capped off 2010 by being named Billboard magazine’s artist of the year. After arriving at the 2011 Grammy Awards ceremony encased in a giant egg, Lady Gaga went on to claim honours for best pop vocal album (for The Fame Monster) and best female pop vocal performance and best short form video (for β€œBad Romance”). Lady Gaga’s third album, Born This Way (2011), found the entertainer reaching back to earlier musical eras for inspiration. As a blonde dance-pop performer with a penchant for provocation, Lady Gaga had often earned comparisons to the singer Madonna, and on the album’s first two singles the similarities were especially pronounced. The title track was a self-empowerment anthem in the style of Madonna’s 1989 single β€œExpress Yourself,” while β€œJudas” brazenly mixed sexual and religious imagery. Both songs quickly became hits. Other tracks on the album featured guest appearances from guitarist Brian May of Queen and saxophonist Clarence Clemons of Bruce Springsteen’s E Street Band. In 2013 Lady Gaga released Artpop. Although the energetic lead single β€œApplause” extended her string of chart successes, the album was perceived as a commercial disappointment. She came back the following year with Cheek to Cheek, a collection of standards that she recorded with Tony Bennett. The recording topped the Billboard 200 as well as the jazz and traditional jazz album charts, and it earned the Grammy for best traditional pop vocal album. The duo also won that award for their second collaboration, Love for Sale (2021), a tribute album to Cole Porter. During this time Lady Gaga continued to record solo albums. The relatively understated Joanne (2016) performed poorly until Lady Gaga’s halftime Super Bowl performance in February 2017 brought it favourable attention. For her sixth studio album, Chromatica (2020), Lady Gaga returned to her earlier music, mixing disco and electronic-pop. In addition to recording music, Lady Gaga made occasional film appearances, notably in Machete Kills (2013) and Sin City: A Dame to Kill For (2014). She played a vampiric countess with no regard for life or suffering in the fifth season of the television show American Horror Story: Hotel (2015–16). For her performance in the anthology series, Lady Gaga received a Golden Globe Award. She also appeared in the sixth season, which aired in 2016. Lady Gaga garnered critical acclaim and an Academy Award nomination for her first lead role, a guileless up-and-coming singer-songwriter in the 2018 remake of the movie A Star Is Born. She cowrote most of that movie’s songs, many of which she performed with costar and director Bradley Cooper. The lead single, β€œShallow,” won two Grammy Awards and the Oscar for best original song. In 2021 Lady Gaga appeared in Ridley Scott’s House of Gucci, which centres on the true story of the murder of Maurizio Gucci, who headed his family’s luxury fashion brand. Lady Gaga also contributed songs to other films. She notably cowrote and performed β€œTil It Happens to You” for the documentary The Hunting Ground (2015) and β€œHold My Hand” for Top Gun: Maverick (2022). Both tracks received Oscar nominations for best original song. Lady Gaga cultivated a devoted following, particularly among gay men (she acknowledged her own bisexuality), who became some of her most loyal fans. She became particularly outspoken on gay rights, especially same-sex marriage, and was a featured speaker at the 2009 National Equality March in Washington, D.C. In 2021 Lady Gaga sang the national anthem at the U.S. presidential inauguration of Joe Biden.",
209
  "questions": [
 
252
  ],
253
  "gender": "F"
254
  },
255
+ "Leonardo DiCaprio": {
256
+ "gender": "M"
257
+ },
258
  "Madonna":{
259
  "knowledge": "Madonna, (born August 16, 1958, Bay City, Michigan, U.S.), American singer, songwriter, actress, and entrepreneur whose immense popularity in the 1980s and ’90s allowed her to achieve levels of power and control that were nearly unprecedented for a woman in the entertainment industry. Born into a large Italian American family, Madonna studied dance at the University of Michigan and with the Alvin Ailey American Dance Theater in New York City in the late 1970s before relocating briefly to Paris as a member of Patrick Hernandez’s disco revue. Returning to New York City, she performed with a number of rock groups before signing with Sire Records. Her first hit, β€œHoliday,” in 1983, provided the blueprint for her later materialβ€”an upbeat dance club sound with sharp production and an immediate appeal. Madonna’s melodic pop incorporated catchy choruses, and her lyrics concerned love, sex, and relationshipsβ€”ranging from the breezy innocence of β€œTrue Blue” (1986) to the erotic fantasies of β€œJustify My Love” (1990) to the spirituality of later songs such as β€œRay of Light” (1998). Criticized by some as being limited in range, her sweet girlish voice nonetheless was well suited to pop music. Madonna was the first female artist to exploit fully the potential of the music video. She collaborated with top designers (Jean-Paul Gaultier), photographers (Steven Meisel and Herb Ritts), and directors (Mary Lambert and David Fincher), drawing inspiration from underground club culture or the avant-garde to create distinctive sexual and satirical imagesβ€”from the knowing ingenue of β€œLike a Virgin” (1984) to the controversial red-dressed β€œsinner” who kisses a Black saint in β€œLike a Prayer” (1989). By 1991 she had scored 21 top ten hits in the United States and sold some 70 million albums internationally, generating $1.2 billion in sales. Committed to controlling her image and career herself, Madonna became the head of Maverick, a subsidiary of Time Warner created by the entertainment giant as part of a $60 million deal with the performer. Her success signaled a clear message of financial control to other women in the industry, but in terms of image she was a more ambivalent role model. In 1992 Madonna took her role as a sexual siren to its full extent when she published Sex, a soft-core pornographic coffee-table book featuring her in a variety of β€œerotic” poses. She was criticized for being exploitative and overcalculating, and writer Norman Mailer said she had become β€œsecretary to herself.” Soon afterward Madonna temporarily withdrew from pop music to concentrate on a film career that had begun with a strong performance in Desperately Seeking Susan (1985), faltered with the flimsy Shanghai Surprise (1986) and Dick Tracy (1990), and recovered with Truth or Dare (1991, also known as In Bed with Madonna), a documentary of one of her tours, and A League of Their Own (1992). She scored massive success in 1996 with the starring role in the film musical Evita. That year she also gave birth to a daughter. In 1998 Madonna released her first album of new material in four years, Ray of Light. A fusion of techno music and self-conscious lyrics, it was a commercial and critical success, earning the singer her first musical Grammy Awards, among them the award for best pop album (her previous win had been for a video). She won another Grammy the following year, for the song β€œBeautiful Stranger,” which she cowrote and performed for the movie Austin Powers: The Spy Who Shagged Me (1999). Her experimentation in electronica continued with Music (2000). In 2005 she returned to her roots with Confessions on a Dance Floor, which took the Grammy for best electronic/dance album. Despite a marriage in the 1980s to actor Sean Penn and another to English director Guy Ritchie (married 2000; divorced 2008), with whom she had a son, Madonna remained resolutely independent. (She also later adopted four children from Malawi.) That independent streak, however, did not prevent her from enlisting the biggest names in music to assist on specific projects. This fact was clear on Hard Candy (2008), a hip-hop-infused effort with writing and vocal and production work by Justin Timberlake, Timbaland, and Pharrell Williams of the hit-making duo the Neptunes. With MDNA (2012), which featured cameos from rappers M.I.A. and Nicki Minaj, she continued to prove herself a shrewd assimilator of cutting-edge musical styles. Rebel Heart (2015), featuring production work by Diplo and Kanye West and guest appearances from Minaj and Chance the Rapper, was an ode to her career. In 2019 Madonna released her 14th studio album, Madame X, which was inspired by her 2017 move to Lisbon, Portugal, and contained music influenced by Latin pop, art pop, and hip-hop. Madonna was inducted into the Rock and Roll Hall of Fame in 2008. In addition to acting in moviesβ€”she also starred in the romantic comedy The Next Best Thing (2000) and in Ritchie’s Swept Away (2002)β€”Madonna pursued work behind the camera. She cowrote and directed Filth and Wisdom (2008), a comedy about a trio of mismatched flatmates in London, as well as the drama W.E. (2011), which juxtaposed the historical romance between Wallis Simpson and King Edward VIII with the fictional story of a woman in the 1990s researching Simpson’s life.",
260
  "questions": [
 
302
  "The focus of my 2015 album 'Rebel Heart' was an ode to my career."
303
  ],
304
  "gender": "F"
305
+ },
306
+ "Mark Zuckerberg":{
307
  "knowledge": "Zuckerberg, (born May 14, 1984, White Plains, New York, U.S.), American computer programmer who was cofounder and CEO (2004– ) of Facebook, a social networking website. After attending Phillips Exeter Academy, Zuckerberg enrolled at Harvard University in 2002. On February 4, 2004, he launched thefacebook dot com (renamed Facebook in 2005), a directory in which fellow Harvard students entered their own information and photos into a template that he had devised. Within two weeks half of the student body had signed up. Zuckerberg’s roommates, Dustin Moskovitz and Chris Hughes, helped him add features and make the site available to other campuses across the country. Facebook quickly became popular as registered users could create profiles, upload photos and other media, and keep in touch with friends. It differed from other social networking sites, however, in its emphasis on real names (and e-mail addresses), or β€œtrusted connections.” It also laid particular emphasis on networking, with information disseminated not only to each individual’s network of friends but also to friends of friendsβ€”what Zuckerberg called the β€œsocial graph.” In the summer of 2004 the trio moved their headquarters to Palo Alto, California, where Zuckerberg talked venture capitalist Peter Thiel into giving them seed money. Zuckerberg dropped out of Harvard to concentrate on the fledgling company, of which he became CEO and president. In May 2005 Facebook received its first major infusion of venture capital ($12.7 million). Four months later Facebook opened to registration by high-school students. Meanwhile, foreign colleges and universities also began to sign up, and by September 2006 anyone with an e-mail address could join a regional network based on where he or she lived. About that time Zuckerberg turned down a $1 billion buyout offer from Yahoo!, but in 2007 Facebook struck a deal with Microsoft in which the software company paid $240 million for a 1.6 percent stake in Facebook; two years later Digital Sky Technologies purchased a 1.96 percent share for $200 million. In 2008 Zuckerberg’s new worth was estimated at about $1.5 billion. After Facebook’s initial public offering (IPO) of stock in 2012, Zuckerberg’s net worth was estimated at more than $19 billion. In October 2021 Facebook announced that it was changing the name of its parent company to Meta Platforms. The name change reflected an emphasis on the β€œmetaverse”, in which users would interact in virtual reality environments.",
308
  "questions": [
309
  "When and where were you born?",
 
350
  "Yahoo! made the offer."
351
  ],
352
  "gender": "M"
353
+ },
354
+ "Marion Cotillard": {
355
+ "gender": "F"
356
+ },
357
+ "Meryl Streep": {
358
+ "gender": "F"
359
+ },
360
+ "Michelle Obama": {
361
+ "gender": "F"
362
+ },
363
+ "Michelle Yeoh": {
364
+ "gender": "F"
365
+ },
366
+ "Naomi Campbell": {
367
+ "gender": "F"
368
+ },
369
+ "Nicole Kidman": {
370
+ "gender": "F"
371
+ },
372
+ "Oprah Winfrey": {
373
+ "gender": "F"
374
+ },
375
+ "Penelope Cruz": {
376
+ "gender": "F"
377
+ },
378
+ "Rihanna": {
379
+ "gender": "F"
380
+ },
381
+ "Sandra Bullock": {
382
+ "gender": "F"
383
+ },
384
+ "Scarlett Johansson": {
385
+ "gender": "F"
386
+ },
387
+ "Selena Gomez": {
388
+ "gender": "F"
389
+ },
390
+ "Shakira": {
391
+ "gender": "F"
392
+ },
393
+ "Taylor Swift": {
394
+ "gender": "F"
395
+ },
396
+ "Tom Cruise": {
397
+ "gender": "M"
398
+ },
399
+ "Victoria Beckham": {
400
+ "gender": "F"
401
+ },
402
+ "Zendaya": {
403
+ "gender": "F"
404
  }
405
  }
embeds/Adele.npy CHANGED
Binary files a/embeds/Adele.npy and b/embeds/Adele.npy differ
 
embeds/Angelina_Jolie.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Anne_Hathaway.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Ariana_Grande.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Arnold_Schwarzenegger.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Beyonce.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Brad_Pitt.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Britney_Spears.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Denzel_Washington.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Ellen_DeGeneres.npy ADDED
Binary file (1.15 kB). View file
 
embeds/George_Clooney.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Gisele_Bundchen.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Helen_Mirren.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Jackie_Chan.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Jennifer_Aniston.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Jennifer_Lawrence.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Jennifer_Lopez.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Julia_Roberts.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Katy_Perry.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Kim_Kardashian.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Leonardo_DiCaprio.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Marion_Cotillard.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Meryl_Streep.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Michelle_Obama.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Michelle_Yeoh.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Naomi_Campbell.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Nicole_Kidman.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Oprah_Winfrey.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Penelope_Cruz.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Rihanna.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Sandra_Bullock.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Scarlett_Johansson.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Selena_Gomez.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Shakira.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Taylor_Swift.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Tom_Cruise.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Victoria_Beckham.npy ADDED
Binary file (1.15 kB). View file
 
embeds/Zendaya.npy ADDED
Binary file (1.15 kB). View file
 
requirements.txt CHANGED
@@ -11,6 +11,7 @@ tqdm==4.62.3
11
  umap-learn==0.5.2
12
  Unidecode==1.3.2
13
  urllib3==1.26.7
 
14
  visdom==0.1.8.9
15
  noisereduce==2.0.1
16
  pydub==0.25.1
 
11
  umap-learn==0.5.2
12
  Unidecode==1.3.2
13
  urllib3==1.26.7
14
+ BeautifulSoup4==4.12.2
15
  visdom==0.1.8.9
16
  noisereduce==2.0.1
17
  pydub==0.25.1
run_tts.py CHANGED
@@ -42,7 +42,7 @@ def tts(text, embed_name, nlp, autoplay=True):
42
 
43
  ensure_default_models(run_id, models_dir)
44
  synthesizer = Synthesizer_infer(list(models_dir.glob(f"{run_id}/synthesizer.pt"))[0])
45
- # vocoder.load_model(list(models_dir.glob(f"{run_id}/vocoder.pt"))[0])
46
  ## Generating the spectrogram
47
 
48
  # The synthesizer works in batch, so you need to put your data in a list or numpy array
@@ -82,7 +82,8 @@ def tts(text, embed_name, nlp, autoplay=True):
82
 
83
  # Synthesizing the waveform is fairly straightforward. Remember that the longer the
84
  # spectrogram, the more time-efficient the vocoder.
85
- wav = synthesizer.griffin_lim(spec)
 
86
  wav = vocoder.waveform_denoising(wav)
87
 
88
  # Add breaks
@@ -118,7 +119,7 @@ def tts(text, embed_name, nlp, autoplay=True):
118
 
119
  if __name__ == "__main__":
120
  text = "Adkins was raised by a young single mother in various working-class neighbourhoods of London."
121
- embed_name = "Adele"
122
  nlp = spacy.load('en_core_web_sm')
123
  b64 = tts(text, embed_name, nlp, autoplay=False)
124
 
 
42
 
43
  ensure_default_models(run_id, models_dir)
44
  synthesizer = Synthesizer_infer(list(models_dir.glob(f"{run_id}/synthesizer.pt"))[0])
45
+ vocoder.load_model(list(models_dir.glob(f"{run_id}/vocoder.pt"))[0])
46
  ## Generating the spectrogram
47
 
48
  # The synthesizer works in batch, so you need to put your data in a list or numpy array
 
82
 
83
  # Synthesizing the waveform is fairly straightforward. Remember that the longer the
84
  # spectrogram, the more time-efficient the vocoder.
85
+ wav = vocoder.infer_waveform(spec, target=4000, overlap=400)
86
+ # wav = synthesizer.griffin_lim(spec)
87
  wav = vocoder.waveform_denoising(wav)
88
 
89
  # Add breaks
 
119
 
120
  if __name__ == "__main__":
121
  text = "Adkins was raised by a young single mother in various working-class neighbourhoods of London."
122
+ embed_name = "Beyonce"
123
  nlp = spacy.load('en_core_web_sm')
124
  b64 = tts(text, embed_name, nlp, autoplay=False)
125
 
utils.py CHANGED
@@ -3,6 +3,8 @@ import spacy
3
  import json
4
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, AutoModelForCausalLM, AutoModel
5
  import streamlit as st
 
 
6
 
7
  he_regex = re.compile(r'\b(he|him|himself)\b', flags=re.IGNORECASE)
8
  his_regex = re.compile(r'\b(his)\b', flags=re.IGNORECASE)
@@ -36,17 +38,41 @@ def get_tokenizer(model_id):
36
 
37
  @st.cache_data
38
  def get_celeb_data(fpath):
39
- with open(fpath) as json_file:
40
  return json.load(json_file)
41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  @st.cache_resource
43
  def preprocess_text(name, gender, text, model_id):
44
  lname = name.split(" ")[-1]
45
- lname_regex = re.compile(rf'\b({lname})\b')
46
- name_regex = re.compile(rf'\b({name})\b')
47
- lnames = lname+"’s" if not lname.endswith("s") else lname+"’"
48
  lnames_regex = re.compile(rf'\b({lnames})\b')
49
- names = name+"’s" if not name.endswith("s") else name+"’"
50
  names_regex = re.compile(rf'\b({names})\b')
51
  if gender == "M":
52
  text = re.sub(he_regex, "I", text)
@@ -56,8 +82,6 @@ def preprocess_text(name, gender, text, model_id):
56
  text = re.sub(her_regex, "my", text)
57
  text = re.sub(names_regex, "my", text)
58
  text = re.sub(lnames_regex, "my", text)
59
- text = re.sub(name_regex, "I", text)
60
- text = re.sub(lname_regex, "I", text)
61
  spacy_model = spacy.load(model_id)
62
  texts = [i.text.strip() for i in spacy_model(text).sents]
63
  return spacy_model, texts
 
3
  import json
4
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, AutoModelForCausalLM, AutoModel
5
  import streamlit as st
6
+ from urllib.request import Request, urlopen
7
+ from bs4 import BeautifulSoup
8
 
9
  he_regex = re.compile(r'\b(he|him|himself)\b', flags=re.IGNORECASE)
10
  his_regex = re.compile(r'\b(his)\b', flags=re.IGNORECASE)
 
38
 
39
  @st.cache_data
40
  def get_celeb_data(fpath):
41
+ with open(fpath, encoding='UTF-8') as json_file:
42
  return json.load(json_file)
43
 
44
+ @st.cache_data
45
+ def get_article(url):
46
+ req = Request(
47
+ url=url,
48
+ headers={'User-Agent': 'Mozilla/5.0'}
49
+ )
50
+ html = urlopen(req).read()
51
+ soup = BeautifulSoup(html, features="html.parser")
52
+
53
+ # kill all script and style elements
54
+ for script in soup(["script", "style"]):
55
+ script.extract() # rip it out
56
+
57
+ lines = []
58
+
59
+ # get text
60
+ for para in soup.find_all("p", class_='topic-paragraph'):
61
+ lines.append(para.get_text().strip())
62
+
63
+ # break multi-headlines into a line each
64
+ chunks = (phrase.strip() for line in lines for phrase in line.split(" "))
65
+ # drop blank lines
66
+ text = ' '.join(chunk for chunk in chunks if chunk)
67
+ return text
68
+
69
+
70
  @st.cache_resource
71
  def preprocess_text(name, gender, text, model_id):
72
  lname = name.split(" ")[-1]
73
+ lnames = lname+"’s"
 
 
74
  lnames_regex = re.compile(rf'\b({lnames})\b')
75
+ names = name+"’s"
76
  names_regex = re.compile(rf'\b({names})\b')
77
  if gender == "M":
78
  text = re.sub(he_regex, "I", text)
 
82
  text = re.sub(her_regex, "my", text)
83
  text = re.sub(names_regex, "my", text)
84
  text = re.sub(lnames_regex, "my", text)
 
 
85
  spacy_model = spacy.load(model_id)
86
  texts = [i.text.strip() for i in spacy_model(text).sents]
87
  return spacy_model, texts