John Liao commited on
Commit
84f2202
·
verified ·
1 Parent(s): 962b14c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -7,6 +7,12 @@ except ImportError:
7
  subprocess.check_call([sys.executable, "-m", "pip", "install", "python-pptx"])
8
  import pptx # Import the library after installing it
9
 
 
 
 
 
 
 
10
  from pptx import Presentation
11
  import openai
12
 
 
7
  subprocess.check_call([sys.executable, "-m", "pip", "install", "python-pptx"])
8
  import pptx # Import the library after installing it
9
 
10
+ try:
11
+ import openai
12
+ except ImportError:
13
+ subprocess.check_call([sys.executable, "-m", "pip", "install", "openai"])
14
+ import openai # Import the library after installing it
15
+
16
  from pptx import Presentation
17
  import openai
18