You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41Lines changed: 41 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -310,6 +310,47 @@ else:
310
310
print(f"Failed to generate podcast: {result}")
311
311
```
312
312
313
+
### Gradio Web UI
314
+
315
+
Local-NotebookLM now includes a user-friendly Gradio web interface that makes it easy to use the tool without command line knowledge:
316
+
317
+
```bash
318
+
python -m local_notebooklm.web_ui
319
+
```
320
+
321
+
By default, the web UI runs locally on http://localhost:7860. You can access it from your browser.
322
+
323
+
#### Web UI Screenshots
324
+
325
+

326
+
*The main interface of the Local-NotebookLM web UI*
327
+
328
+
#### Web UI Options
329
+
330
+
| Option | Description | Default |
331
+
|--------|-------------|---------|
332
+
|`--share`| Make the UI accessible over the network | False |
333
+
|`--port`| Specify a custom port | 7860 |
334
+
335
+
#### Example Commands
336
+
337
+
Basic local usage:
338
+
```bash
339
+
python -m local_notebooklm.web_ui
340
+
```
341
+
342
+
Share with others on your network:
343
+
```bash
344
+
python -m local_notebooklm.web_ui --share
345
+
```
346
+
347
+
Use a custom port:
348
+
```bash
349
+
python -m local_notebooklm.web_ui --port 8080
350
+
```
351
+
352
+
The web interface provides all the same options as the command line tool in an intuitive UI, making it easier for non-technical users to generate audio content from PDFs.
353
+
313
354
### FastAPI Server
314
355
315
356
Start the FastAPI server to access the functionality via a web API:
Copy file name to clipboardExpand all lines: local_notebooklm/steps/prompts.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -329,15 +329,15 @@
329
329
Make sure to structure the response exactly like this:
330
330
331
331
[
332
-
("Speaker n", "translated text 1"),
333
-
("Speaker n", "translated text 2"),
334
-
("Speaker n", "translated text 3")
332
+
("Speaker n", "translated text 1"),
333
+
("Speaker n", "translated text 2"),
334
+
("Speaker n", "translated text 3")
335
335
]
336
336
337
337
Do not change or rewrite the text in any way other than reformatformatting it into a list of tuples and translating it. Your response must only change the format and language, not the content.
338
338
339
339
Ensure your output is in the correct tuple format, the speaker’s dialogue remains faithful to the original text, and the translation accurately reflects the meaning in {language}.
340
-
DO NOT include episode titles, named speakers, intros, or section headers—ONLY provide raw dialogue labeled as ‘Speaker 1,’ ‘Speaker 2,’ etc. ONLY ONE SPEAKER CAN TALK AT A TIME."""
340
+
DO NOT include episode titles, named speakers, intros, section headers, or ``` — ONLY provide raw dialogue labeled as ‘Speaker 1,’ ‘Speaker 2,’ etc. ONLY ONE SPEAKER CAN TALK AT A TIME."""
341
341
342
342
343
343
gen_z_mapping_prompt="""Infuse humor, pop culture references, and a very laid-back conversational tone. Keep it **engaging, slightly chaotic, and fun, but still clear and informative.** Use modern wording naturally, like:
temperature=0.2, # Lower temperature for more deterministic output
202
+
temperature=0.3,
202
203
)
203
204
204
205
# Try to parse the fixed transcript
@@ -294,9 +295,36 @@ def step3(
294
295
language=language
295
296
)
296
297
297
-
# Validate transcript format
298
298
ifnotvalidate_transcript_format(transcript):
299
-
raiseTranscriptGenerationError("Generated transcript is not in the correct format")
299
+
logger.warning("Generated transcript is not in the correct format. Attempting to fix...")
300
+
301
+
fix_prompt= [
302
+
{"role": "system", "content": "Convert the following text into valid Python syntax as a list of tuples with format: [('Speaker1', 'Text1'), ('Speaker2', 'Text2'), ...]. Return ONLY the Python list, nothing else, no other text."},
0 commit comments