File size: 2,615 Bytes
31defb6
 
 
 
 
 
 
faa1ca7
31defb6
 
 
 
 
 
 
 
04d5d81
 
31defb6
979d3c4
964d470
5b6b68a
9c357bf
adbb180
31defb6
 
bc67d8d
 
 
 
cc0a2f2
 
31defb6
 
 
04d5d81
31defb6
4896ebd
04d5d81
31defb6
 
 
 
 
a2934a4
 
 
08a4021
a11f33b
 
3bf7ebf
 
6a7b968
31defb6
 
6a50b6a
 
7e709b3
6a29b7c
957ac20
 
 
31defb6
 
 
 
 
 
698009d
31defb6
875ef07
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import whisper
import os
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
from sentence_transformers import SentenceTransformer, CrossEncoder, util
import streamlit as st
import en_core_web_lg

nltk.download('punkt')

from nltk import sent_tokenize

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

st.sidebar.header("Home")

asr_model_options = ['tiny.en','base.en','small.en']
    
asr_model_name = st.sidebar.selectbox("Whisper Model Options", options=asr_model_options, key="sbox")

st.markdown("## Earnings Call Analysis Whisperer")

twitter_link = """
[![](https://img.shields.io/twitter/follow/nickmuchi?label=@nickmuchi&style=social)](https://twitter.com/nickmuchi)
"""

st.markdown(twitter_link)

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 API, takes approx 3mins to transcribe a 1hr call less than 25mb in size.
    - 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 [philschmid/flan-t5-base-samsum](https://huggingface.co/philschmid/flan-t5-base-samsum) model with entity extraction
    - Question Answering Search engine powered by Langchain and [Sentence Transformers](https://huggingface.co/sentence-transformers/all-mpnet-base-v2).
    
    **πŸ‘‡ Enter a YouTube Earnings Call URL below and navigate to the sidebar tabs** 
    
"""
)

if 'sbox' not in st.session_state:
    st.session_state.sbox = asr_model_name
    
if "earnings_passages" not in st.session_state:
    st.session_state["earnings_passages"] = ''
    
if "sen_df" not in st.session_state:
    st.session_state['sen_df'] = ''
        
url_input = st.text_input(
        label="Enter YouTube URL, example below is McDonalds Earnings Call Q1 2023",
        value="https://www.youtube.com/watch?v=4p6o5kkZYyA")

if 'url' not in st.session_state:
    st.session_state['url'] = ""

st.session_state['url'] = url_input
        
st.markdown(
    "<h3 style='text-align: center; color: red;'>OR</h3>",
    unsafe_allow_html=True
)

upload_wav = st.file_uploader("Upload a .wav/.mp3/.mp4 audio file ",key="upload",type=['.wav','.mp3','.mp4'])

st.markdown("![visitors](https://visitor-badge.glitch.me/badge?page_id=nickmuchi.earnings-call-whisperer)")