akarshrajsingh7 commited on
Commit
864385b
·
1 Parent(s): 89ca0bf

Update - Example Text

Browse files
Files changed (2) hide show
  1. Example_PDF.pdf +0 -0
  2. app.py +20 -5
Example_PDF.pdf ADDED
Binary file (26.3 kB). View file
 
app.py CHANGED
@@ -7,8 +7,11 @@ from base64 import b64encode
7
  from fpdf import FPDF
8
  import io, string, re, math
9
  from io import StringIO
 
10
  from streamlit_pdf_viewer import pdf_viewer
11
 
 
 
12
  # Importing the Fastify Class
13
  from fast_reader import Fastify_Reader
14
 
@@ -62,12 +65,24 @@ with st.sidebar:
62
  st.image("Logo.jpg")
63
  st.markdown("<div style='text-align: center;'>How fast can you read?</div>", unsafe_allow_html=True)
64
 
 
 
 
 
 
 
 
 
 
 
 
 
65
  # Main Page
66
  tab1, tab2= st.tabs(["Input Text", "PDF file"])
67
 
68
  # First tab where Text is input
69
  with tab1:
70
- user_input = st.text_input("Enter some text")
71
 
72
  # Compare Check Box
73
  compare = st.checkbox('Compare with Fastified Text', value=False, key='compare')
@@ -89,11 +104,11 @@ with tab1:
89
 
90
  with col1:
91
  with st.container(border = True):
92
- st.markdown("<div style='text-align: center;'><strong>Original PDF viewer</strong></div>", unsafe_allow_html=True)
93
  pdf_viewer(input = text_to_pdf(text), width = 600)
94
  with col2:
95
  with st.container(border = True):
96
- st.markdown("<div style='text-align: center;'><strong>Fastified PDF viewer</strong></div>", unsafe_allow_html=True)
97
  pdf_viewer(text_to_pdf_fastify(text), width = 600)
98
 
99
  else:
@@ -131,11 +146,11 @@ with tab2:
131
 
132
  with col1:
133
  with st.container(border = True):
134
- st.markdown("<div style='text-align: center;'><strong>Original PDF viewer</strong></div>", unsafe_allow_html=True)
135
  pdf_viewer(text_to_pdf(text), width = 600)
136
  with col2:
137
  with st.container(border = True):
138
- st.markdown("<div style='text-align: center;'><strong>Fastified PDF viewer</strong></div>", unsafe_allow_html=True)
139
  pdf_viewer(text_to_pdf_fastify(text), width = 600)
140
 
141
  else:
 
7
  from fpdf import FPDF
8
  import io, string, re, math
9
  from io import StringIO
10
+ from pathlib import Path
11
  from streamlit_pdf_viewer import pdf_viewer
12
 
13
+ _here = Path(__file__).parent
14
+
15
  # Importing the Fastify Class
16
  from fast_reader import Fastify_Reader
17
 
 
65
  st.image("Logo.jpg")
66
  st.markdown("<div style='text-align: center;'>How fast can you read?</div>", unsafe_allow_html=True)
67
 
68
+ # Example inputs
69
+ example_text = '''
70
+ Did you know that your brain is capable of reading this text faster than you might think? It's true! Our brains have an incredible capacity for processing information rapidly, and with the right techniques, you can harness this power to become a speed reading master.
71
+
72
+ Speed reading isn't just about skimming through text; it's about training your brain to absorb and comprehend information at a much quicker pace. By utilizing strategies like chunking, minimizing subvocalization, and expanding your peripheral vision, you can significantly increase your reading speed without sacrificing understanding.
73
+
74
+ Imagine being able to plow through emails, reports, and articles in half the time it takes you now. With speed reading, that dream can become a reality. Not only will you save time, but you'll also improve your productivity and unlock new opportunities for learning and growth.
75
+
76
+ So why wait? Dive into the world of speed reading today and unlock your brain's full potential. With practice and dedication, you'll be amazed at how quickly you can conquer even the most daunting reading tasks. Get started now and watch your reading speed soar!
77
+ '''
78
+
79
+
80
  # Main Page
81
  tab1, tab2= st.tabs(["Input Text", "PDF file"])
82
 
83
  # First tab where Text is input
84
  with tab1:
85
+ user_input = st.text_input("Enter some text", example_text)
86
 
87
  # Compare Check Box
88
  compare = st.checkbox('Compare with Fastified Text', value=False, key='compare')
 
104
 
105
  with col1:
106
  with st.container(border = True):
107
+ st.markdown("<div style='text-align: center;'><strong>Original Text</strong></div>", unsafe_allow_html=True)
108
  pdf_viewer(input = text_to_pdf(text), width = 600)
109
  with col2:
110
  with st.container(border = True):
111
+ st.markdown("<div style='text-align: center;'><strong>Fastified Text</strong></div>", unsafe_allow_html=True)
112
  pdf_viewer(text_to_pdf_fastify(text), width = 600)
113
 
114
  else:
 
146
 
147
  with col1:
148
  with st.container(border = True):
149
+ st.markdown("<div style='text-align: center;'><strong>Original Text</strong></div>", unsafe_allow_html=True)
150
  pdf_viewer(text_to_pdf(text), width = 600)
151
  with col2:
152
  with st.container(border = True):
153
+ st.markdown("<div style='text-align: center;'><strong>Fastified Text</strong></div>", unsafe_allow_html=True)
154
  pdf_viewer(text_to_pdf_fastify(text), width = 600)
155
 
156
  else: