AI-Translator
Build an online translation and grammar checking APP based on the Transformer model.
APP link: https://junchuanyu-tools.hf.space/
Interface
The AI-Translator has two interfaces, one for text translation and one for grammar checking and text generation.You can enter sentence through the interface and click the “RUN” button to get the result.
How to use API
You can realize more functions by calling the API.The api call demo is as follows:
DEMO-1: translation
import requests
= requests.post("https://junchuanyu-tools.hf.space/run/translate_zh", json={
response "data": [
"Build an online translation and grammar checking app.",
]
}).json()
= response["data"]
data
print(data)
= requests.post("https://junchuanyu-tools.hf.space/run/translate_en", json={
response2 "data": [
"你好吗?代码男",
]
}).json()
= response2["data"]
data2 print(data2)
DEMO-2: grammar checker
import requests
= requests.post("https://junchuanyu-tools.hf.space/run/gramacorrect", json={
response "data": [
"I is jack",
]
}).json()
= response["data"]
data print(data)
DEMO-3: text generator
import requests
= requests.post("https://junchuanyu-tools.hf.space/run/generator", json={
response "data": [
"hello coding guy, i want",
]
}).json()
= response["data"]
data
print(data)
If you want to get the downloaded label data and related forms, you can follow the WeChat public account [45度科研人] and leave me a message!