Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,11 +10,11 @@ from codeinterpreterapi import CodeInterpreterSession
|
|
10 |
|
11 |
|
12 |
|
13 |
-
|
14 |
|
15 |
-
|
16 |
#async with CodeInterpreterSession(model="gpt-3.5-turbo",openai_api_key="") as session:
|
17 |
-
response =
|
18 |
|
19 |
return [response.content,response.files]
|
20 |
|
|
|
10 |
|
11 |
|
12 |
|
13 |
+
def codeinterpreter(openai_key,prompt, files):
|
14 |
|
15 |
+
with CodeInterpreterSession(model="gpt-3.5",openai_api_key=openai_key) as session:
|
16 |
#async with CodeInterpreterSession(model="gpt-3.5-turbo",openai_api_key="") as session:
|
17 |
+
response = session.generate_response(prompt, files=files)
|
18 |
|
19 |
return [response.content,response.files]
|
20 |
|