cogcorp commited on
Commit
44f782b
·
1 Parent(s): 23cb550

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py CHANGED
@@ -5,6 +5,23 @@ import os
5
  import io
6
  import nltk
7
  import openai
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
 
9
  # Put your OpenAI API key here
10
  openai.api_key = os.getenv('OpenAPI')
 
5
  import io
6
  import nltk
7
  import openai
8
+ import pip
9
+ import subprocess
10
+
11
+ # install required libraries
12
+ subprocess.check_call([sys.executable, "-m", "pip", "install", "-r", "requirements.txt"])
13
+
14
+ # download required NLTK data packages
15
+ nltk.download('punkt')
16
+ nltk.download('all')
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
 
26
  # Put your OpenAI API key here
27
  openai.api_key = os.getenv('OpenAPI')