Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,7 +50,15 @@ def process_youtube(youtube_url, num_questions):
|
|
| 50 |
|
| 51 |
return notes, quiz
|
| 52 |
except Exception as e:
|
| 53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
# Create Gradio interface
|
| 56 |
with gr.Blocks(title="AI Teaching Assistant") as demo:
|
|
|
|
| 50 |
|
| 51 |
return notes, quiz
|
| 52 |
except Exception as e:
|
| 53 |
+
error_message = (
|
| 54 |
+
"⚠️ Unable to process the video. Common issues:\n"
|
| 55 |
+
"1. The video might not have captions enabled\n"
|
| 56 |
+
"2. The video might be private or restricted\n"
|
| 57 |
+
"3. The URL might be incorrect\n\n"
|
| 58 |
+
f"Technical details: {str(e)}\n\n"
|
| 59 |
+
"Please try another YouTube video that has captions enabled."
|
| 60 |
+
)
|
| 61 |
+
return error_message, ""
|
| 62 |
|
| 63 |
# Create Gradio interface
|
| 64 |
with gr.Blocks(title="AI Teaching Assistant") as demo:
|