Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
import os
|
2 |
import subprocess
|
3 |
import sys
|
|
|
|
|
4 |
|
5 |
# Check if the question_generation directory exists; if not, clone the repository
|
6 |
if not os.path.exists("question_generation"):
|
@@ -10,7 +12,10 @@ if not os.path.exists("question_generation"):
|
|
10 |
# Assuming 'question_generation' is the folder where pipelines.py is located
|
11 |
sys.path.append(os.path.join(os.path.dirname(__file__), 'question_generation'))
|
12 |
|
13 |
-
|
|
|
|
|
|
|
14 |
# Continue with the rest of your imports and app logic
|
15 |
import whisper
|
16 |
import torch
|
|
|
1 |
import os
|
2 |
import subprocess
|
3 |
import sys
|
4 |
+
import nltk
|
5 |
+
|
6 |
|
7 |
# Check if the question_generation directory exists; if not, clone the repository
|
8 |
if not os.path.exists("question_generation"):
|
|
|
12 |
# Assuming 'question_generation' is the folder where pipelines.py is located
|
13 |
sys.path.append(os.path.join(os.path.dirname(__file__), 'question_generation'))
|
14 |
|
15 |
+
# Download the punkt tokenizer
|
16 |
+
nltk.download('punkt')
|
17 |
+
|
18 |
+
|
19 |
# Continue with the rest of your imports and app logic
|
20 |
import whisper
|
21 |
import torch
|