Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -38,6 +38,40 @@ st.set_page_config(
|
|
38 |
)
|
39 |
load_dotenv()
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
# Add available English voices for Edge TTS
|
42 |
EDGE_TTS_VOICES = [
|
43 |
"en-US-AriaNeural", # Default voice
|
@@ -422,36 +456,6 @@ def create_paper_audio_files(papers, input_question):
|
|
422 |
play_and_download_audio(combined_file, file_type=file_format)
|
423 |
papers.append({'title': 'Combined Summary', 'full_audio': combined_file})
|
424 |
|
425 |
-
def display_marquee_controls():
|
426 |
-
st.sidebar.markdown("### 🎯 Marquee Settings")
|
427 |
-
cols = st.sidebar.columns(2)
|
428 |
-
with cols[0]:
|
429 |
-
bg_color = st.color_picker("🎨 Background", "#1E1E1E", key="bg_color_picker")
|
430 |
-
text_color = st.color_picker("✍️ Text", "#FFFFFF", key="text_color_picker")
|
431 |
-
with cols[1]:
|
432 |
-
font_size = st.slider("📏 Size", 10, 24, 14, key="font_size_slider")
|
433 |
-
duration = st.slider("⏱️ Speed", 1, 20, 10, key="duration_slider")
|
434 |
-
|
435 |
-
return {
|
436 |
-
"background": bg_color,
|
437 |
-
"color": text_color,
|
438 |
-
"font-size": f"{font_size}px",
|
439 |
-
"animationDuration": f"{duration}s",
|
440 |
-
"width": "100%",
|
441 |
-
"lineHeight": "35px"
|
442 |
-
}
|
443 |
-
|
444 |
-
|
445 |
-
def display_marquee_controls_papers():
|
446 |
-
return {
|
447 |
-
"background": "#1E1E1E",
|
448 |
-
"color": "#1E1E1E",
|
449 |
-
"font-size": f"24px",
|
450 |
-
"animationDuration": f"20s",
|
451 |
-
"width": "100%",
|
452 |
-
"lineHeight": "35px"
|
453 |
-
}
|
454 |
-
|
455 |
|
456 |
|
457 |
def display_papers(papers):
|
@@ -682,8 +686,6 @@ def display_file_manager_sidebar(groups_sorted):
|
|
682 |
|
683 |
# 🎯 11. Main Application
|
684 |
def main():
|
685 |
-
# Add global marquee settings near top of main
|
686 |
-
marquee_settings = display_marquee_controls()
|
687 |
|
688 |
# Initialize content holder in session state if not present
|
689 |
if 'marquee_content' not in st.session_state:
|
|
|
38 |
)
|
39 |
load_dotenv()
|
40 |
|
41 |
+
|
42 |
+
def display_marquee_controls():
|
43 |
+
st.sidebar.markdown("### 🎯 Marquee Settings")
|
44 |
+
cols = st.sidebar.columns(2)
|
45 |
+
with cols[0]:
|
46 |
+
bg_color = st.color_picker("🎨 Background", "#1E1E1E", key="bg_color_picker")
|
47 |
+
text_color = st.color_picker("✍️ Text", "#FFFFFF", key="text_color_picker")
|
48 |
+
with cols[1]:
|
49 |
+
font_size = st.slider("📏 Size", 10, 24, 14, key="font_size_slider")
|
50 |
+
duration = st.slider("⏱️ Speed", 1, 20, 10, key="duration_slider")
|
51 |
+
|
52 |
+
return {
|
53 |
+
"background": bg_color,
|
54 |
+
"color": text_color,
|
55 |
+
"font-size": f"{font_size}px",
|
56 |
+
"animationDuration": f"{duration}s",
|
57 |
+
"width": "100%",
|
58 |
+
"lineHeight": "35px"
|
59 |
+
}
|
60 |
+
|
61 |
+
|
62 |
+
def display_marquee_controls_papers():
|
63 |
+
return {
|
64 |
+
"background": "#1E1E1E",
|
65 |
+
"color": "#1E1E1E",
|
66 |
+
"font-size": f"24px",
|
67 |
+
"animationDuration": f"20s",
|
68 |
+
"width": "100%",
|
69 |
+
"lineHeight": "35px"
|
70 |
+
}
|
71 |
+
|
72 |
+
# Add global marquee settings
|
73 |
+
marquee_settings = display_marquee_controls()
|
74 |
+
|
75 |
# Add available English voices for Edge TTS
|
76 |
EDGE_TTS_VOICES = [
|
77 |
"en-US-AriaNeural", # Default voice
|
|
|
456 |
play_and_download_audio(combined_file, file_type=file_format)
|
457 |
papers.append({'title': 'Combined Summary', 'full_audio': combined_file})
|
458 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
459 |
|
460 |
|
461 |
def display_papers(papers):
|
|
|
686 |
|
687 |
# 🎯 11. Main Application
|
688 |
def main():
|
|
|
|
|
689 |
|
690 |
# Initialize content holder in session state if not present
|
691 |
if 'marquee_content' not in st.session_state:
|