Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -209,7 +209,8 @@ def predict(inputs, top_p, temperature, chat_counter, chatbot=[], history=[]):
|
|
209 |
continue
|
210 |
|
211 |
if chunk.decode() :
|
212 |
-
|
|
|
213 |
|
214 |
if len(chunk) > 12 and "content" in json.loads(chunk[6:])['choices'][0]['delta']:
|
215 |
|
@@ -223,11 +224,11 @@ def predict(inputs, top_p, temperature, chat_counter, chatbot=[], history=[]):
|
|
223 |
|
224 |
|
225 |
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
#return history, df, basedir
|
232 |
|
233 |
|
|
|
209 |
continue
|
210 |
|
211 |
if chunk.decode() :
|
212 |
+
|
213 |
+
chunk = chunk.decode()
|
214 |
|
215 |
if len(chunk) > 12 and "content" in json.loads(chunk[6:])['choices'][0]['delta']:
|
216 |
|
|
|
224 |
|
225 |
|
226 |
|
227 |
+
df=pd.DataFrame()
|
228 |
+
if UseMemory:
|
229 |
+
outputfileName = 'ChatGPT-RLHF-Memory.csv' # Test first time file create
|
230 |
+
df = store_message(chat, history, outputfileName) # Save to dataset
|
231 |
+
basedir = get_base(outputfileName)
|
232 |
#return history, df, basedir
|
233 |
|
234 |
|