radinhas commited on
Commit
9cfd9ac
1 Parent(s): 1d433a1

Update apis/chat_api.py

Browse files
Files changed (1) hide show
  1. 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("/uploadfile/")
311
- async def create_upload_file(
312
- file: UploadFile = File(description="A file read as UploadFile"),
 
 
313
  ):
314
- return {"filename": file.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