Spaces:
Sleeping
Sleeping
commented the authentication
Browse files
app.py
CHANGED
|
@@ -35,11 +35,11 @@ logger.info("Application starting up.")
|
|
| 35 |
# --- APPLICATION CONFIGURATION ---
|
| 36 |
APP_TITLE = "Prohori (প্রহরী)"
|
| 37 |
APP_TAGLINE = "Analyze GoogleNews & YouTube video trends, engagement, and comment activity for your search topics."
|
| 38 |
-
APP_FOOTER = "Developed by Arjon"
|
| 39 |
|
| 40 |
# --- FONT CONFIGURATION ---
|
| 41 |
FONT_PATH = 'NotoSansBengali-Regular.ttf'
|
| 42 |
-
BANGLA_FONT =
|
| 43 |
|
| 44 |
def setup_bangla_font():
|
| 45 |
"""Properly set up Bengali font for all visualizations"""
|
|
@@ -59,7 +59,7 @@ def setup_bangla_font():
|
|
| 59 |
else:
|
| 60 |
logger.error(f"Font file {FONT_PATH} not found. Bengali text will not render correctly.")
|
| 61 |
BANGLA_FONT = None
|
| 62 |
-
plt.rcParams['font.family'] = '
|
| 63 |
return False
|
| 64 |
|
| 65 |
# Initialize font system
|
|
@@ -1316,7 +1316,7 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue", secondary_hue="orange"),
|
|
| 1316 |
<div class='gr-card' style='margin-bottom:32px;'>
|
| 1317 |
<div class='gr-title'>Prohori (প্রহরী)</div>
|
| 1318 |
<div style='color:#94a3b8;font-size:1.2rem;margin-bottom:8px;'>Analyze GoogleNews & YouTube video trends, engagement, and comment activity for your search topics.</div>
|
| 1319 |
-
<div style='color:#22d3ee;font-size:1rem;'>Developed
|
| 1320 |
</div>
|
| 1321 |
""")
|
| 1322 |
# --- STATE MANAGEMENT ---
|
|
@@ -1407,7 +1407,7 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue", secondary_hue="orange"),
|
|
| 1407 |
gr.HTML("<div class='gr-card'><h3>Search Criteria</h3></div>")
|
| 1408 |
yt_search_keywords = gr.Textbox(
|
| 1409 |
label="YouTube Search Keywords",
|
| 1410 |
-
placeholder="e.g.,
|
| 1411 |
info="Keywords to search for in YouTube videos."
|
| 1412 |
)
|
| 1413 |
yt_max_videos_slider = gr.Slider(
|
|
@@ -1639,5 +1639,10 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue", secondary_hue="orange"),
|
|
| 1639 |
yt_detailed_summary
|
| 1640 |
]
|
| 1641 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1642 |
if __name__ == "__main__":
|
| 1643 |
-
app.launch(debug=True, share=True)
|
|
|
|
| 35 |
# --- APPLICATION CONFIGURATION ---
|
| 36 |
APP_TITLE = "Prohori (প্রহরী)"
|
| 37 |
APP_TAGLINE = "Analyze GoogleNews & YouTube video trends, engagement, and comment activity for your search topics."
|
| 38 |
+
APP_FOOTER = "Developed by Arjon for CDSR"
|
| 39 |
|
| 40 |
# --- FONT CONFIGURATION ---
|
| 41 |
FONT_PATH = 'NotoSansBengali-Regular.ttf'
|
| 42 |
+
BANGLA_FONT = FONT_PATH
|
| 43 |
|
| 44 |
def setup_bangla_font():
|
| 45 |
"""Properly set up Bengali font for all visualizations"""
|
|
|
|
| 59 |
else:
|
| 60 |
logger.error(f"Font file {FONT_PATH} not found. Bengali text will not render correctly.")
|
| 61 |
BANGLA_FONT = None
|
| 62 |
+
plt.rcParams['font.family'] = 'sans-serif'
|
| 63 |
return False
|
| 64 |
|
| 65 |
# Initialize font system
|
|
|
|
| 1316 |
<div class='gr-card' style='margin-bottom:32px;'>
|
| 1317 |
<div class='gr-title'>Prohori (প্রহরী)</div>
|
| 1318 |
<div style='color:#94a3b8;font-size:1.2rem;margin-bottom:8px;'>Analyze GoogleNews & YouTube video trends, engagement, and comment activity for your search topics.</div>
|
| 1319 |
+
<div style='color:#22d3ee;font-size:1rem;'>Developed for CDSR by Arjon</div>
|
| 1320 |
</div>
|
| 1321 |
""")
|
| 1322 |
# --- STATE MANAGEMENT ---
|
|
|
|
| 1407 |
gr.HTML("<div class='gr-card'><h3>Search Criteria</h3></div>")
|
| 1408 |
yt_search_keywords = gr.Textbox(
|
| 1409 |
label="YouTube Search Keywords",
|
| 1410 |
+
placeholder="e.g., প্রধান উপদেষ্টা",
|
| 1411 |
info="Keywords to search for in YouTube videos."
|
| 1412 |
)
|
| 1413 |
yt_max_videos_slider = gr.Slider(
|
|
|
|
| 1639 |
yt_detailed_summary
|
| 1640 |
]
|
| 1641 |
)
|
| 1642 |
+
AUTH_USERS = [
|
| 1643 |
+
("admin", "admin123"),
|
| 1644 |
+
("user", "user123")
|
| 1645 |
+
]
|
| 1646 |
+
|
| 1647 |
if __name__ == "__main__":
|
| 1648 |
+
app.launch(debug=True, share=True '''auth=AUTH_USERS, ssr_mode=False''')
|