lanbogao commited on
Commit
de037c6
1 Parent(s): b8e519c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -12,7 +12,7 @@ app = FastAPI()
12
  langs = ["None"] + sorted(list(whisper.tokenizer.LANGUAGES.values()))
13
  model_size = list(whisper._MODELS.keys())
14
 
15
- @app.get("/")
16
  def read_main():
17
  return {"message": "This is your main app"}
18
 
@@ -22,8 +22,8 @@ def read_main():
22
  # Stream the subtitle as a response
23
  #return StreamingResponse(requests.get(subtitle_url, stream=True).iter_content(chunk_size=1024))
24
 
25
- @app.get("/subtitle")
26
- async def get_subtitle(url, lang='en'):
27
  # Download subtitles if available
28
  ydl_opts = {
29
  'writesubtitles': True,
 
12
  langs = ["None"] + sorted(list(whisper.tokenizer.LANGUAGES.values()))
13
  model_size = list(whisper._MODELS.keys())
14
 
15
+ @app.get("/test")
16
  def read_main():
17
  return {"message": "This is your main app"}
18
 
 
22
  # Stream the subtitle as a response
23
  #return StreamingResponse(requests.get(subtitle_url, stream=True).iter_content(chunk_size=1024))
24
 
25
+
26
+ def get_subtitle(url, lang='en'):
27
  # Download subtitles if available
28
  ydl_opts = {
29
  'writesubtitles': True,