Adarsh Shirawalmath commited on
Commit
b673f7e
·
1 Parent(s): c0d4ac2
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -116,11 +116,11 @@ def generate_quiz(text, video_description):
116
  @app.post("/transcribe")
117
  async def transcribe_video(video: VideoURL):
118
  try:
119
- yt = pytubefix.YouTube(str(video.url), use_oauth=True, allow_oauth_cache=True, token_file="/tmp/token.json")
120
  audio_stream = yt.streams.filter(only_audio=True, file_extension='mp4').first()
121
  if not audio_stream:
122
  raise HTTPException(status_code=400, detail="No audio stream found for this video")
123
- "
124
  video_description = yt.description
125
 
126
  audio_file = audio_stream.download(output_path="temp")
 
116
  @app.post("/transcribe")
117
  async def transcribe_video(video: VideoURL):
118
  try:
119
+ yt = pytubefix.YouTube(str(video.url), use_oauth=True, allow_oauth_cache=True, token_file="token.json")
120
  audio_stream = yt.streams.filter(only_audio=True, file_extension='mp4').first()
121
  if not audio_stream:
122
  raise HTTPException(status_code=400, detail="No audio stream found for this video")
123
+
124
  video_description = yt.description
125
 
126
  audio_file = audio_stream.download(output_path="temp")