rocky250 commited on
Commit
6b8f2fc
Β·
verified Β·
1 Parent(s): f0cf309

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -28
app.py CHANGED
@@ -681,34 +681,34 @@ with gr.Blocks(title="Misinformation Detection & Public Engagement ") as demo:
681
  </div>
682
  """)
683
 
684
- # # Settings β€” NO API key field
685
- # with gr.Accordion("βš™οΈ Settings", open=False):
686
- # gr.HTML("""
687
- # <div style="background:#0d1119;border:1px solid #1e2330;border-radius:8px;
688
- # padding:0.7rem 1rem;margin-bottom:0.8rem;font-family:'DM Mono',monospace;
689
- # font-size:0.78rem;color:#5a6070">
690
- # πŸ”‘ YouTube API key is read from the <code style="color:#00d4ff">YT_API_KEY</code>
691
- # Space secret β€” it is never exposed in the UI.
692
- # </div>
693
- # """)
694
- # with gr.Row():
695
- # sentiment_selector = gr.Dropdown(
696
- # choices=[
697
- # ("VADER β€” fast, CPU-only (~5 000 comments/sec)", "vader"),
698
- # ("DistilBERT β€” accurate, downloads ~500 MB on first run", "hf"),
699
- # ],
700
- # value="vader",
701
- # label="Sentiment Engine",
702
- # scale=3,
703
- # )
704
- # max_comments_slider = gr.Slider(
705
- # minimum=10, maximum=500, value=150, step=10,
706
- # label="Max comments to fetch",
707
- # scale=3,
708
- # info="YouTube API quota: ~1 unit per comment request",
709
- # )
710
-
711
- # Input tabs
712
  with gr.Tabs():
713
 
714
  with gr.TabItem("πŸ”— YouTube URL"):
 
681
  </div>
682
  """)
683
 
684
+ # Settings β€” NO API key field
685
+ with gr.Accordion("βš™οΈ Settings", open=False):
686
+ gr.HTML("""
687
+ <div style="background:#0d1119;border:1px solid #1e2330;border-radius:8px;
688
+ padding:0.7rem 1rem;margin-bottom:0.8rem;font-family:'DM Mono',monospace;
689
+ font-size:0.78rem;color:#5a6070">
690
+ πŸ”‘ YouTube API key is read from the <code style="color:#00d4ff">YT_API_KEY</code>
691
+ Space secret β€” it is never exposed in the UI.
692
+ </div>
693
+ """)
694
+ with gr.Row():
695
+ sentiment_selector = gr.Dropdown(
696
+ choices=[
697
+ ("VADER β€” fast, CPU-only (~5 000 comments/sec)", "vader"),
698
+ ("DistilBERT β€” accurate, downloads ~500 MB on first run", "hf"),
699
+ ],
700
+ value="vader",
701
+ label="Sentiment Engine",
702
+ scale=3,
703
+ )
704
+ max_comments_slider = gr.Slider(
705
+ minimum=10, maximum=500, value=150, step=10,
706
+ label="Max comments to fetch",
707
+ scale=3,
708
+ info="YouTube API quota: ~1 unit per comment request",
709
+ )
710
+
711
+ Input tabs
712
  with gr.Tabs():
713
 
714
  with gr.TabItem("πŸ”— YouTube URL"):