internomega-terrablue commited on
Commit
23e38ab
Β·
1 Parent(s): 3c3a632

you tube api fix 2

Browse files
Files changed (3) hide show
  1. app.py +2 -0
  2. pages/sources.py +1 -1
  3. theme.py +29 -0
app.py CHANGED
@@ -220,6 +220,8 @@ with gr.Blocks(css=CUSTOM_CSS, theme=dark_theme, title="NotebookLM") as demo:
220
  choices=[],
221
  label="Select source to delete",
222
  scale=3,
 
 
223
  )
224
  delete_source_btn = gr.Button("Delete Source", variant="stop", scale=1)
225
 
 
220
  choices=[],
221
  label="Select source to delete",
222
  scale=3,
223
+ elem_id="source-delete-dropdown",
224
+ allow_custom_value=True,
225
  )
226
  delete_source_btn = gr.Button("Delete Source", variant="stop", scale=1)
227
 
pages/sources.py CHANGED
@@ -84,7 +84,7 @@ def get_source_choices(state: UserData) -> list[str]:
84
  nb = get_active_notebook(state)
85
  if not nb:
86
  return []
87
- return [s.filename for s in nb.sources]
88
 
89
 
90
  def handle_file_upload(files, state: UserData) -> tuple[UserData, str, str, list[str]]:
 
84
  nb = get_active_notebook(state)
85
  if not nb:
86
  return []
87
+ return [s.filename for s in nb.sources if s.status == "ready"]
88
 
89
 
90
  def handle_file_upload(files, state: UserData) -> tuple[UserData, str, str, list[str]]:
theme.py CHANGED
@@ -304,6 +304,35 @@ CUSTOM_CSS = """
304
  box-shadow: 0 4px 15px rgba(102,126,234,0.3) !important;
305
  }
306
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
  /* ── Scrollbar ── */
308
  ::-webkit-scrollbar { width: 6px; }
309
  ::-webkit-scrollbar-track { background: transparent; }
 
304
  box-shadow: 0 4px 15px rgba(102,126,234,0.3) !important;
305
  }
306
 
307
+ /* ── Source delete dropdown ── */
308
+ #source-delete-dropdown {
309
+ border: 1px solid rgba(102,126,234,0.3);
310
+ border-radius: 12px;
311
+ background: rgba(102,126,234,0.06);
312
+ }
313
+ #source-delete-dropdown label {
314
+ color: #a0a0f0 !important;
315
+ font-weight: 600;
316
+ }
317
+ #source-delete-dropdown input, #source-delete-dropdown .wrap {
318
+ background: rgba(14,17,23,0.8) !important;
319
+ border-color: rgba(102,126,234,0.25) !important;
320
+ color: #e0e0f0 !important;
321
+ border-radius: 10px !important;
322
+ }
323
+ #source-delete-dropdown ul {
324
+ background: #1a1d2e !important;
325
+ border: 1px solid rgba(102,126,234,0.3) !important;
326
+ border-radius: 10px !important;
327
+ }
328
+ #source-delete-dropdown li {
329
+ color: #c0c0e0 !important;
330
+ }
331
+ #source-delete-dropdown li:hover, #source-delete-dropdown li.selected {
332
+ background: rgba(102,126,234,0.15) !important;
333
+ color: #e0e0f0 !important;
334
+ }
335
+
336
  /* ── Scrollbar ── */
337
  ::-webkit-scrollbar { width: 6px; }
338
  ::-webkit-scrollbar-track { background: transparent; }