Skip to content

Commit

Permalink
Bump version from 0.1.0a4 to 0.1.0a5
Browse files Browse the repository at this point in the history
  • Loading branch information
ffreemt committed Aug 11, 2023
1 parent 6d2e923 commit f9d8d24
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,16 @@ or run the server on the external net, for example at port 9888
uvicorn deepl_fastapi_pw.deepl_server:app --reload --host 0.0.0.0 --port 9888
```

* Explore and consume
### Explore and consume

Point your browser to [http://127.0.0.1:8001/text/?q=test&to_lang=zh](http://127.0.0.1:8001/text/?q=test&to_lang=zh)

Or in command line:
```bash
python -c "import httpx; print(httpx.get('http://127.0.0.1:8001/text/?to_lang=zh&q=test 1\ntest 2').json())"
# output: {'q': 'test 1\ntest 2', 'from_lang': None, 'to_lang': 'zh', 'trtext': '测试 1\n测试 2', 'translation': '测试 1\n测试 2'}
```

Or in python code (`pip install requests` first)
```python
import requests
Expand All @@ -78,7 +84,6 @@ print(requests.get(url).json())

`'translation'` is there for `OmegaT` plugin. Refer to the `OmegaT Fake MT plugin setup` part
in [https://github.com/ffreemt/deepl-fastapi](https://github.com/ffreemt/deepl-fastapi)

```
# post
text = "test me \n and him"
Expand Down

0 comments on commit f9d8d24

Please sign in to comment.