NEXAS commited on
Commit
e998b7c
·
verified ·
1 Parent(s): a19d53d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -21
app.py CHANGED
@@ -200,9 +200,6 @@ def format_prompt_inputs(image_collection, text_collection, video_collection, us
200
 
201
  import time # To simulate delays during processing
202
 
203
- import streamlit as st
204
- import time
205
-
206
  def page_1():
207
  add_background_image("bg.jpg")
208
  # st.set_page_config(layout='wide', page_title="Virtual Tutor")
@@ -220,23 +217,8 @@ def page_1():
220
  with open(pdf_path, "wb") as f:
221
  f.write(uploaded_file.getbuffer())
222
 
223
- # Custom spinner with black bold text
224
- with st.empty(): # Use an empty container for dynamic content
225
- st.markdown(
226
- """
227
- <div style="display: flex; align-items: center;">
228
- <div class="spinner" style="margin-right: 10px; border: 4px solid rgba(0, 0, 0, 0.1); border-top: 4px solid black; border-radius: 50%; width: 24px; height: 24px; animation: spin 1s linear infinite;"></div>
229
- <p style="color: black; font-weight: bold; margin: 0;">Processing PDF... Please wait.</p>
230
- </div>
231
- <style>
232
- @keyframes spin {
233
- 0% { transform: rotate(0deg); }
234
- 100% { transform: rotate(360deg); }
235
- }
236
- </style>
237
- """,
238
- unsafe_allow_html=True
239
- )
240
  time.sleep(2) # Simulate processing time
241
 
242
  try:
@@ -252,7 +234,6 @@ def page_1():
252
  st.error(f"Error processing PDF: {e}")
253
 
254
 
255
-
256
  def page_2():
257
  add_background_image("bg2.jpg")
258
  st.markdown("""
 
200
 
201
  import time # To simulate delays during processing
202
 
 
 
 
203
  def page_1():
204
  add_background_image("bg.jpg")
205
  # st.set_page_config(layout='wide', page_title="Virtual Tutor")
 
217
  with open(pdf_path, "wb") as f:
218
  f.write(uploaded_file.getbuffer())
219
 
220
+ # Normal spinner with Streamlit
221
+ with st.spinner("Processing PDF... Please wait."):
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  time.sleep(2) # Simulate processing time
223
 
224
  try:
 
234
  st.error(f"Error processing PDF: {e}")
235
 
236
 
 
237
  def page_2():
238
  add_background_image("bg2.jpg")
239
  st.markdown("""