johnhelf commited on
Commit
842c0e1
1 Parent(s): 40658fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -13,8 +13,9 @@ from codeinterpreterapi import CodeInterpreterSession
13
  def codeinterpreter(openai_key,prompt, files):
14
 
15
  fileList = []
16
- for idx, file in enumerate(files):
17
- fileList.append(file)
 
18
 
19
  with CodeInterpreterSession(model="gpt-3.5",openai_api_key=openai_key) as session:
20
  #async with CodeInterpreterSession(model="gpt-3.5-turbo",openai_api_key="") as session:
 
13
  def codeinterpreter(openai_key,prompt, files):
14
 
15
  fileList = []
16
+ if files != None:
17
+ for idx, file in enumerate(files):
18
+ fileList.append(file)
19
 
20
  with CodeInterpreterSession(model="gpt-3.5",openai_api_key=openai_key) as session:
21
  #async with CodeInterpreterSession(model="gpt-3.5-turbo",openai_api_key="") as session: