storresbusquets commited on
Commit
469e5ec
1 Parent(s): 7f88bda

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -1
app.py CHANGED
@@ -57,6 +57,8 @@ class GradioInference:
57
  - Sentiment Analysis: using Hugging Face's default sentiment classifier
58
  - WordCloud: using the wordcloud python library.
59
  """
 
 
60
  progress(0, desc="Starting analysis")
61
 
62
  if self.yt is None:
@@ -198,6 +200,7 @@ class GradioInference:
198
  - Sentiment Analysis: using Hugging Face's default sentiment classifier
199
  - WordCloud: using the wordcloud python library.
200
  """
 
201
  progress(0, desc="Starting analysis")
202
 
203
  if lang == "none":
@@ -243,7 +246,7 @@ class GradioInference:
243
  )
244
  # End multilingual summary
245
 
246
- progress(0.50, desc="Extracting Keywords")
247
 
248
  # Extract keywords using VoiceLabT5
249
  task_prefix = "Keywords: "
@@ -313,6 +316,7 @@ class GradioInference:
313
  - Sentiment Analysis: using Hugging Face's default sentiment classifier
314
  - WordCloud: using the wordcloud python library.
315
  """
 
316
  progress(0, desc="Starting analysis")
317
 
318
  progress(0.30, desc="Summarizing")
@@ -547,6 +551,23 @@ with block:
547
 
548
  gr.Markdown("### Audio Examples")
549
  gr.Examples([[os.path.join(os.path.dirname(__file__),"audios/EnglishLecture.mp4")]], inputs=audio_file)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
550
 
551
  gr.Markdown("### About the app:")
552
 
 
57
  - Sentiment Analysis: using Hugging Face's default sentiment classifier
58
  - WordCloud: using the wordcloud python library.
59
  """
60
+
61
+ gr.Info("Starting process")
62
  progress(0, desc="Starting analysis")
63
 
64
  if self.yt is None:
 
200
  - Sentiment Analysis: using Hugging Face's default sentiment classifier
201
  - WordCloud: using the wordcloud python library.
202
  """
203
+ gr.Info("Starting process")
204
  progress(0, desc="Starting analysis")
205
 
206
  if lang == "none":
 
246
  )
247
  # End multilingual summary
248
 
249
+ progress(0.60, desc="Extracting Keywords")
250
 
251
  # Extract keywords using VoiceLabT5
252
  task_prefix = "Keywords: "
 
316
  - Sentiment Analysis: using Hugging Face's default sentiment classifier
317
  - WordCloud: using the wordcloud python library.
318
  """
319
+ gr.Info("Starting process")
320
  progress(0, desc="Starting analysis")
321
 
322
  progress(0.30, desc="Summarizing")
 
551
 
552
  gr.Markdown("### Audio Examples")
553
  gr.Examples([[os.path.join(os.path.dirname(__file__),"audios/EnglishLecture.mp4")]], inputs=audio_file)
554
+
555
+ gr.Markdown("###Text Examples")
556
+ gr.Examples(["""Relations between India and Canada have been rocky for some time. But this week, they hit new lows.
557
+
558
+ After Prime Minister Justin Trudeau on Monday accused India of assassinating a Canadian Sikh in British Columbia, India angrily denied the charges. Both countries are up in arms, and the diplomatic row shows no sign of easing anytime soon.
559
+
560
+ We asked a pair of commentators, Barkha Dutt from India and David Moscrop from Canada, to give us a sense of the mood in their respective countries. — Damir Marusic
561
+
562
+ Barkha Dutt: India and Canada stand at the precipice of a breakdown in relations. Trudeau has only himself to blame.
563
+
564
+ The Canadian prime minister’s habit of turning a blind eye toward extremism in his country — secessionists who violently advocate for Khalistan, a separate homeland for Sikhs — has made him the most disliked world leader in India.
565
+
566
+ His claim that Prime Minister Narendra Modi’s Indian government is behind the murder of one such person — Hardeep Singh Nijjar, the leader of the self-proclaimed Khalistan Tiger Force, and a designated terrorist in India — has cemented his poor reputation.
567
+
568
+ Nijjar was wanted for multiple crimes in India. In 2016, Indian authorities filed a red notice with Interpol for his arrest. On June 18, he was fatally shot in the parking lot of a Sikh temple by unidentified assailants. At the time, some Canadian journalists pointed to internecine battles within Khalistani groups. “It has all the makings of a gangland hit,” Terry Milewski, an expert on the global Khalistan network, told me.
569
+
570
+ Now, almost four months later, Trudeau is declaring Nijjar’s death an assassination. To Indians, the timing is as suspect as the claim."""],inputs=article, label="News_1")
571
 
572
  gr.Markdown("### About the app:")
573