habulaj commited on
Commit
fff5342
·
verified ·
1 Parent(s): 98480d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -430,12 +430,12 @@ TRADUZA TUDO DE IMPORTANTE NO {media_desc_final}, que tenha dialogo... Nunca dei
430
  detail="Falha ao processar formato SRT - resposta inválida"
431
  )
432
 
433
- # Retornar SRT como resposta de texto
434
- return Response(
435
- content=srt_cleaned,
436
- media_type="text/plain; charset=utf-8",
437
- headers={
438
- "Content-Disposition": "attachment; filename=subtitles.srt"
439
  }
440
  )
441
 
@@ -619,4 +619,4 @@ async def post_response(
619
  try:
620
  os.unlink(temp_file.name)
621
  except:
622
- pass
 
430
  detail="Falha ao processar formato SRT - resposta inválida"
431
  )
432
 
433
+ # Retornar SRT em JSON
434
+ return JSONResponse(
435
+ content={
436
+ "srt": srt_cleaned,
437
+ "success": True,
438
+ "media_type": media_type
439
  }
440
  )
441
 
 
619
  try:
620
  os.unlink(temp_file.name)
621
  except:
622
+ pass