Spaces:
Sleeping
Sleeping
Update pages/tc.py
Browse files- pages/tc.py +5 -2
pages/tc.py
CHANGED
@@ -1,4 +1,7 @@
|
|
1 |
import streamlit as st
|
|
|
|
|
|
|
2 |
from streamlit import session_state
|
3 |
import numpy as np
|
4 |
import json
|
@@ -130,8 +133,8 @@ if uploaded_file:
|
|
130 |
{"role": "user", "content": f'What do the following have in common?\n\nValues:\n"""\n{reviews}\n"""\n\nTheme:'}
|
131 |
]
|
132 |
|
133 |
-
response =
|
134 |
-
model="gpt-
|
135 |
messages=messages,
|
136 |
temperature=0,
|
137 |
max_tokens=64,
|
|
|
1 |
import streamlit as st
|
2 |
+
import openai
|
3 |
+
openai.api_key = os.getenv("OPENAI_API_KEY")
|
4 |
+
|
5 |
from streamlit import session_state
|
6 |
import numpy as np
|
7 |
import json
|
|
|
133 |
{"role": "user", "content": f'What do the following have in common?\n\nValues:\n"""\n{reviews}\n"""\n\nTheme:'}
|
134 |
]
|
135 |
|
136 |
+
response = openai.completions.create(
|
137 |
+
model="gpt-3.5-turbo-instruct",
|
138 |
messages=messages,
|
139 |
temperature=0,
|
140 |
max_tokens=64,
|