Update app.py
Browse files
app.py
CHANGED
@@ -176,11 +176,11 @@ async def get_transcript(youtube_url: str):
|
|
176 |
if not line.strip().isdigit()
|
177 |
and '-->' not in line
|
178 |
and line.strip())
|
179 |
-
return
|
180 |
else:
|
181 |
-
return
|
182 |
else:
|
183 |
-
return
|
184 |
|
185 |
except Exception as e:
|
186 |
raise HTTPException(status_code=500, detail=str(e))
|
|
|
176 |
if not line.strip().isdigit()
|
177 |
and '-->' not in line
|
178 |
and line.strip())
|
179 |
+
return {'transcript': text}
|
180 |
else:
|
181 |
+
return {'transcript': 'Subtitle file not found'}
|
182 |
else:
|
183 |
+
return {'transcript': 'No transcript available'}
|
184 |
|
185 |
except Exception as e:
|
186 |
raise HTTPException(status_code=500, detail=str(e))
|