Spaces:
Runtime error
Runtime error
storresbusquets
commited on
Commit
β’
30cd647
1
Parent(s):
0135c32
Update app.py
Browse files
app.py
CHANGED
@@ -497,16 +497,16 @@ with block as demo:
|
|
497 |
label = gr.Label(label="Sentiment Analysis")
|
498 |
wordcloud_image = gr.Image(label="WordCloud")
|
499 |
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
)
|
504 |
-
clear = gr.ClearButton([audio_file,text, summary, keywords, label, wordcloud_image], value="Clear ποΈ")
|
505 |
-
btn.click(
|
506 |
-
gio.from_audio_input,
|
507 |
-
inputs=[lang, size, audio_file],
|
508 |
-
outputs=[text, summary, keywords, label, wordcloud_image],
|
509 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
510 |
|
511 |
with gr.Tab("From Article π"):
|
512 |
with gr.Box():
|
@@ -528,37 +528,40 @@ with block as demo:
|
|
528 |
label = gr.Label(label="Sentiment Analysis")
|
529 |
wordcloud_image = gr.Image(label="WordCloud")
|
530 |
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
|
541 |
with block:
|
542 |
gr.Markdown("### Video Examples")
|
543 |
gr.Examples(["https://www.youtube.com/shorts/xDNzz8yAH7I",
|
544 |
"https://www.youtube.com/watch?v=MnrJzXM7a6o&pp=ygURc3RldmUgam9icyBzcGVlY2g%3D",
|
545 |
-
"https://www.youtube.com/watch?v=FKjj1tNcbtM&pp=ygUvZGFuaWVsIGdvbGVtYW4gdGVkIHRhbGsgZW1vdGlvbmFsIGludGVsbGlnZW5jZSA%3D"],
|
|
|
546 |
|
547 |
gr.Markdown("### Audio Examples")
|
548 |
-
|
549 |
-
|
550 |
-
|
|
|
|
|
551 |
|
552 |
gr.Markdown("### About the app:")
|
553 |
|
554 |
-
with gr.Accordion("What is
|
555 |
gr.Markdown(
|
556 |
-
"
|
557 |
)
|
558 |
|
559 |
-
with gr.Accordion("How does
|
560 |
gr.Markdown(
|
561 |
-
"
|
562 |
)
|
563 |
|
564 |
with gr.Accordion("What languages are supported for the analysis?", open=False):
|
@@ -568,7 +571,7 @@ with block:
|
|
568 |
|
569 |
with gr.Accordion("Can I analyze audio files instead of YouTube videos?", open=False):
|
570 |
gr.Markdown(
|
571 |
-
"Yes, you can analyze audio files directly. Simply upload your audio file to the app, and it will provide the same transcription, summarization, keyword extraction, sentiment analysis, and word cloud generation features."
|
572 |
)
|
573 |
|
574 |
with gr.Accordion("What are the different model sizes available for transcription?", open=False):
|
@@ -581,9 +584,9 @@ with block:
|
|
581 |
"The time taken for analysis may vary based on the duration of the video or audio file and the selected model size. Shorter content will be processed more quickly."
|
582 |
)
|
583 |
|
584 |
-
with gr.Accordion("Who developed
|
585 |
gr.Markdown(
|
586 |
-
"
|
587 |
)
|
588 |
|
589 |
gr.HTML(
|
|
|
497 |
label = gr.Label(label="Sentiment Analysis")
|
498 |
wordcloud_image = gr.Image(label="WordCloud")
|
499 |
|
500 |
+
with gr.Row():
|
501 |
+
btn = gr.Button(
|
502 |
+
"Get Audio Insights π", variant="primary"
|
|
|
|
|
|
|
|
|
|
|
|
|
503 |
)
|
504 |
+
clear = gr.ClearButton([audio_file,text, summary, keywords, label, wordcloud_image], value="Clear ποΈ")
|
505 |
+
btn.click(
|
506 |
+
gio.from_audio_input,
|
507 |
+
inputs=[lang, size, audio_file],
|
508 |
+
outputs=[text, summary, keywords, label, wordcloud_image],
|
509 |
+
)
|
510 |
|
511 |
with gr.Tab("From Article π"):
|
512 |
with gr.Box():
|
|
|
528 |
label = gr.Label(label="Sentiment Analysis")
|
529 |
wordcloud_image = gr.Image(label="WordCloud")
|
530 |
|
531 |
+
with gr.Row():
|
532 |
+
btn = gr.Button(
|
533 |
+
"Get Text insights π", variant="primary")
|
534 |
+
clear = gr.ClearButton([article, summary, keywords, label, wordcloud_image], value="Clear")
|
535 |
+
btn.click(
|
536 |
+
gio.from_article,
|
537 |
+
inputs=[article],
|
538 |
+
outputs=[summary, keywords, label, wordcloud_image],
|
539 |
+
)
|
540 |
|
541 |
with block:
|
542 |
gr.Markdown("### Video Examples")
|
543 |
gr.Examples(["https://www.youtube.com/shorts/xDNzz8yAH7I",
|
544 |
"https://www.youtube.com/watch?v=MnrJzXM7a6o&pp=ygURc3RldmUgam9icyBzcGVlY2g%3D",
|
545 |
+
"https://www.youtube.com/watch?v=FKjj1tNcbtM&pp=ygUvZGFuaWVsIGdvbGVtYW4gdGVkIHRhbGsgZW1vdGlvbmFsIGludGVsbGlnZW5jZSA%3D"],
|
546 |
+
inputs=link)
|
547 |
|
548 |
gr.Markdown("### Audio Examples")
|
549 |
+
gr.Examples([
|
550 |
+
[os.path.join(os.path.dirname(__file__),"audios/EnglishLectura.wav")],
|
551 |
+
# [os.path.join(os.path.dirname(__file__),"audios/TED_platon.wav")],
|
552 |
+
]
|
553 |
+
inputs=audio_file)
|
554 |
|
555 |
gr.Markdown("### About the app:")
|
556 |
|
557 |
+
with gr.Accordion("What is Media Insights?", open=False):
|
558 |
gr.Markdown(
|
559 |
+
"Media Insights is a tool developed for academic purposes that allows you to analyze YouTube videos, audio files or some text. It provides features like transcription, summarization, keyword extraction, sentiment analysis, and word cloud generation for multimedia content."
|
560 |
)
|
561 |
|
562 |
+
with gr.Accordion("How does Media Insights work?", open=False):
|
563 |
gr.Markdown(
|
564 |
+
"Media Insights leverages several powerful AI models and libraries. It uses OpenAI's Whisper for Automatic Speech Recognition (ASR) to transcribe audio content. It summarizes the transcribed text using Facebook's BART model, extracts keywords with VoiceLabT5, performs sentiment analysis with DistilBERT, and generates word clouds."
|
565 |
)
|
566 |
|
567 |
with gr.Accordion("What languages are supported for the analysis?", open=False):
|
|
|
571 |
|
572 |
with gr.Accordion("Can I analyze audio files instead of YouTube videos?", open=False):
|
573 |
gr.Markdown(
|
574 |
+
"Yes, you can analyze audio files directly. Simply upload your audio file to the app, and it will provide the same transcription, summarization, keyword extraction, sentiment analysis, and word cloud generation features. In addition, you can also paste your article or text of your preference, to get all the insights directly from it."
|
575 |
)
|
576 |
|
577 |
with gr.Accordion("What are the different model sizes available for transcription?", open=False):
|
|
|
584 |
"The time taken for analysis may vary based on the duration of the video or audio file and the selected model size. Shorter content will be processed more quickly."
|
585 |
)
|
586 |
|
587 |
+
with gr.Accordion("Who developed Media Insights?" ,open=False):
|
588 |
gr.Markdown(
|
589 |
+
"Media Insights was developed by students as part of the 2022/23 Master's in Big Data & Data Science program at Universidad Complutense de Madrid for academic purposes (Trabajo de Fin de Master)."
|
590 |
)
|
591 |
|
592 |
gr.HTML(
|