Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,6 +7,25 @@ import nltk
|
|
7 |
import openai
|
8 |
import time
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
# Put your OpenAI API key here
|
11 |
openai.api_key = os.getenv('OpenAPI')
|
12 |
|
|
|
7 |
import openai
|
8 |
import time
|
9 |
|
10 |
+
|
11 |
+
import pip
|
12 |
+
import subprocess
|
13 |
+
import sys
|
14 |
+
|
15 |
+
# install required libraries
|
16 |
+
subprocess.check_call([sys.executable, "-m", "pip", "install", "-r", "requirements.txt"])
|
17 |
+
|
18 |
+
# download required NLTK data packages
|
19 |
+
nltk.download('punkt')
|
20 |
+
nltk.download('all') # or any other packages your project depends on
|
21 |
+
|
22 |
+
|
23 |
+
|
24 |
+
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
# Put your OpenAI API key here
|
30 |
openai.api_key = os.getenv('OpenAPI')
|
31 |
|