AhmedTaha012 commited on
Commit
281267d
1 Parent(s): 006cd2f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -177,16 +177,17 @@ def clean_and_preprocess(text):
177
 
178
  st.title("Transcript Analysis")
179
  transcript = st.text_area("Enter the transcript:", height=200)
180
- transcript=replace_abbreviations(transcript)
181
- transcript=replace_abbreviations(transcript)
182
- transcript=removeSpeakers(transcript)
183
- transcript=removeQA(transcript)
184
- transcript=clean_and_preprocess(transcript)
185
- tokens=transcript.split()
186
- splitSize=256
187
- chunks=[tokens[r*splitSize:(r+1)*splitSize] for r in range(math.ceil(len(tokens)/splitSize))]
188
 
189
  if st.button("Analyze"):
 
 
 
 
 
 
 
 
190
  st.subheader("Sentiment Analysis")
191
  sentiment = [sentiment_model(x)[0]['label'] for x in chunks]
192
  sentiment=max(sentiment,key=sentiment.count)
 
177
 
178
  st.title("Transcript Analysis")
179
  transcript = st.text_area("Enter the transcript:", height=200)
180
+
 
 
 
 
 
 
 
181
 
182
  if st.button("Analyze"):
183
+ transcript=replace_abbreviations(transcript)
184
+ transcript=replace_abbreviations(transcript)
185
+ transcript=removeSpeakers(transcript)
186
+ transcript=removeQA(transcript)
187
+ transcript=clean_and_preprocess(transcript)
188
+ tokens=transcript.split()
189
+ splitSize=256
190
+ chunks=[tokens[r*splitSize:(r+1)*splitSize] for r in range(math.ceil(len(tokens)/splitSize))]
191
  st.subheader("Sentiment Analysis")
192
  sentiment = [sentiment_model(x)[0]['label'] for x in chunks]
193
  sentiment=max(sentiment,key=sentiment.count)