File size: 2,004 Bytes
2b5cb3b
 
 
 
 
 
 
 
2356771
2b5cb3b
 
d1dcb4e
fd6372c
2b5cb3b
 
 
 
 
 
 
 
 
 
 
a1dfd05
d61a02b
a1dfd05
3f0f70e
 
 
30b1b63
3f0f70e
80b1e90
3f0f70e
 
30b1b63
e7ec23a
3f0f70e
 
 
e7ec23a
 
 
 
 
 
 
 
 
 
2b5cb3b
 
a1dfd05
2b5cb3b
d1dcb4e
 
2b5cb3b
d39ea15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import whisper
import os
from pytube import YouTube
import pandas as pd
import plotly_express as px
import nltk
import plotly.graph_objects as go
from optimum.onnxruntime import ORTModelForSequenceClassification
from transformers import pipeline, AutoTokenizer, AutoModelForSequenceClassification, AutoModelForTokenClassification
from sentence_transformers import SentenceTransformer, CrossEncoder, util
import streamlit as st
import en_core_web_lg
from functions import *

nltk.download('punkt')

from nltk import sent_tokenize


st.set_page_config(
    page_title="Home",
    page_icon="πŸ“ž",
)

st.sidebar.header("Home")
st.markdown("## Earnings Call Analysis Whisperer")

st.markdown(
    """
    This app assists finance analysts with transcribing and analysis Earnings Calls by carrying out the following tasks:
    - Transcribing earnings calls using Open AI's [Whisper](https://github.com/openai/whisper).
    - Analysing the sentiment of transcribed text using the quantized version of [FinBert-Tone](https://huggingface.co/nickmuchi/quantized-optimum-finbert-tone).
    - Summarization of the call with [FaceBook-Bart-Large-CNN](https://huggingface.co/facebook/bart-large-cnn) model with entity extraction
    - Semantic search engine with [Sentence-Transformers](https://huggingface.co/sentence-transformers/all-mpnet-base-v2) and reranking results with a Cross-Encoder.
    
    **πŸ‘‡ Enter a YouTube Earnings Call URL below and navigate to the sidebar tabs** 
    
"""
)

url_input = st.text_input(
        label='Enter YouTube URL, e.g "https://www.youtube.com/watch?v=8pmbScvyfeY"', key="url")
        
st.markdown(
    "<h3 style='text-align: center; color: red;'>OR</h3>",
    unsafe_allow_html=True
)

upload_wav = st.file_uploader("Upload a .wav sound file ",key="upload")

auth_token = os.environ.get("auth_token")

progress_bar = st.sidebar.progress(0)
    
nlp = get_spacy()    
asr_model, sent_pipe, sum_pipe, ner_pipe, sbert, cross_encoder  = load_models()

progress_bar.empty()