awacke1 commited on
Commit
59f73f8
·
1 Parent(s): 2daaaf3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
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
- chunk = chunk.decode()
 
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
- #df=pd.DataFrame()
227
- #if UseMemory:
228
- # outputfileName = 'ChatGPT-RLHF-Memory.csv' # Test first time file create
229
- # df = store_message(chat, history, outputfileName) # Save to dataset
230
- # basedir = get_base(outputfileName)
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