Nazhar commited on
Commit
6439f7b
·
verified ·
1 Parent(s): ea9419f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -17,6 +17,7 @@ from langchain_community.llms import HuggingFaceHub
17
  from langchain_core.prompts import PromptTemplate
18
  from langchain.chains import RetrievalQA
19
  import os
 
20
 
21
 
22
  # Disclaimer to be dispalyed at the bottom of each tab
@@ -509,9 +510,12 @@ with news_analysis:
509
  # Display news source in the container
510
  col1.write(f"<span style='font-size: small;'>By {sources[index]}</span><br>", unsafe_allow_html=True)
511
  # Display news content on click
512
- with col1:
 
 
 
513
  with st.expander("Show Full Article"):
514
- st.markdown(news_list[index])
515
 
516
  # Display features on click
517
  with col2:
 
17
  from langchain_core.prompts import PromptTemplate
18
  from langchain.chains import RetrievalQA
19
  import os
20
+ import re
21
 
22
 
23
  # Disclaimer to be dispalyed at the bottom of each tab
 
510
  # Display news source in the container
511
  col1.write(f"<span style='font-size: small;'>By {sources[index]}</span><br>", unsafe_allow_html=True)
512
  # Display news content on click
513
+ with col1:
514
+ text = news_list[index].replace("$", "\$")
515
+ # Remove non-ASCII characters
516
+ text = re.sub(r"[^\x00-\x7F]+", "'", text)
517
  with st.expander("Show Full Article"):
518
+ st.markdown(text)
519
 
520
  # Display features on click
521
  with col2: