Spaces:
Runtime error
Runtime error
Commit
•
0bfc850
1
Parent(s):
cdfaa1d
Update main.py
Browse files
main.py
CHANGED
@@ -14,6 +14,11 @@ app = FastAPI()
|
|
14 |
async def test():
|
15 |
return "test"
|
16 |
|
|
|
|
|
|
|
|
|
|
|
17 |
@app.post("/speech_to_text/")
|
18 |
async def create_upload_file(file: UploadFile = File(...)):
|
19 |
|
|
|
14 |
async def test():
|
15 |
return "test"
|
16 |
|
17 |
+
@app.post("/translate/")
|
18 |
+
async def translate(text,language):
|
19 |
+
respond = client.predict(text,language,api_name="/translate")
|
20 |
+
return respond
|
21 |
+
|
22 |
@app.post("/speech_to_text/")
|
23 |
async def create_upload_file(file: UploadFile = File(...)):
|
24 |
|