Skip to content

Commit 3ef6aee

Browse files
committed
docs: update README with translation functionality and language selection
1 parent b4935f2 commit 3ef6aee

File tree

1 file changed

+36
-7
lines changed

1 file changed

+36
-7
lines changed

README.md

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Easy Webpage Summarizer
22

3-
A Python script designed to summarize webpages from specified URLs using the LangChain framework and the ChatOllama model. It leverages advanced language models to generate detailed summaries, making it an invaluable tool for quickly understanding the content of web-based documents.
3+
A Python script designed to summarize webpages from specified URLs using the LangChain framework and the ChatOllama model. It leverages advanced language models to generate detailed summaries and translate them to multiple languages, making it an invaluable tool for quickly understanding the content of web-based documents.
44

55
## Requirements
66

@@ -17,30 +17,59 @@ pip install -r requirements.txt
1717
## Features
1818

1919
- Summarization of webpages and youtube videos directly from URLs.
20-
- Translates to Turkish language (other languages will be added soon!)
21-
- Integration with LangChain and ChatOllama for state-of-the-art summarization.
20+
- **Translation to multiple languages** with language selection
21+
- Integration with LangChain and ChatOllama for state-of-the-art summarization and translation.
2222
- Command-line interface for easy use and integration into workflows.
23+
- Web interface with language selection dropdown.
2324

2425
## Usage
2526

27+
### Command Line Interface
28+
2629
To use the webpage summarizer, run the script from the command line, providing the URL of the document you wish to summarize:
2730

2831
```bash
29-
python summarizer.py -u "http://example.com/document"
32+
# Basic summarization only
33+
python app/summarizer.py -u "http://example.com/document"
34+
35+
# Summarize and translate to Spanish (default)
36+
python app/summarizer.py -u "http://example.com/document" -t "Spanish"
37+
38+
# Summarize and translate to French
39+
python app/summarizer.py -u "http://example.com/document" -t "French"
40+
41+
# Summarize and translate to German
42+
python app/summarizer.py -u "http://example.com/document" -t "German"
3043
```
3144

3245
Replace `http://example.com/document` with the actual URL of the document you want to summarize.
3346

47+
#### Available Languages
48+
49+
The following languages are supported for translation:
50+
- Spanish (default)
51+
- French
52+
- German
53+
- Italian
54+
- Portuguese
55+
- Turkish
56+
- English
57+
3458
### Web UI
3559

36-
To use the webpage summarizer in you web browser, you can also try gradio app.
60+
To use the webpage summarizer in your web browser, you can also try the gradio app:
3761

3862
```bash
3963
python app/webui.py
4064
```
4165

4266
![gradio](assets/gradio.png)
4367

68+
The web interface includes:
69+
- URL input for summarization
70+
- Language selection dropdown (appears after generating summary)
71+
- Translate button to convert summary to selected language
72+
4473
## Docker
4574

4675
```bash
@@ -51,14 +80,14 @@ docker run -p 7860:7860 web_summarizer
5180
docker run -d --network='host' -p 7860:7860 web_summarizer
5281
```
5382

54-
5583
## Development
5684

5785
To contribute to the development of this script, clone the repository, make your changes, and submit a pull request. We welcome contributions that improve the script's functionality or extend its capabilities.
5886

5987
- [x] Summarize youtube videos
6088
- [x] Dockerize project
61-
- [ ] Translate to different languages
89+
- [x] Translate to different languages
90+
- [x] Language selection for translations
6291
- [ ] Streaming text output on gradio
6392
- [ ] Serve on web
6493

0 commit comments

Comments
 (0)