Spaces:
Running
Running
Update apis/chat_api.py
Browse files- apis/chat_api.py +6 -4
apis/chat_api.py
CHANGED
|
@@ -307,11 +307,13 @@ app.add_middleware(
|
|
| 307 |
allow_methods=["*"],
|
| 308 |
allow_headers=["*"],
|
| 309 |
)
|
| 310 |
-
@app.post("/
|
| 311 |
-
async def
|
| 312 |
-
|
|
|
|
|
|
|
| 313 |
):
|
| 314 |
-
return {"filename":
|
| 315 |
|
| 316 |
if __name__ == "__main__":
|
| 317 |
args = ArgParser().args
|
|
|
|
| 307 |
allow_methods=["*"],
|
| 308 |
allow_headers=["*"],
|
| 309 |
)
|
| 310 |
+
@app.post("/transcribe")
|
| 311 |
+
async def whisper_transcribe(
|
| 312 |
+
audio_file: UploadFile = File(description="Audio file for transcribe"),
|
| 313 |
+
language: str = Form(),
|
| 314 |
+
model: str = Form(),
|
| 315 |
):
|
| 316 |
+
return {"filename": audio_file.content_type}
|
| 317 |
|
| 318 |
if __name__ == "__main__":
|
| 319 |
args = ArgParser().args
|