broadfield commited on
Commit
1a2b67b
·
verified ·
1 Parent(s): 9ddedae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -46,8 +46,7 @@ def generate(prompt,history,mod=2,tok=4000,seed=1,role="ASSISTANT",data=None):
46
  client=InferenceClient(clients[int(mod)]['name'])
47
  client_tok=clients[int(mod)]['max_tokens']
48
  good_seed=[947385642222,7482965345792,8584806344673]
49
- if not history:
50
- history=[{'role':'user','content':prompt}]
51
  if not os.path.isdir(loc_folder):os.mkdir(loc_folder)
52
 
53
  if os.path.isfile(f'{loc_folder}/{loc_file}.json'):
@@ -217,7 +216,7 @@ def agent(prompt_in,history,mod=2):
217
  com=""
218
  go=True
219
  MAX_DATA=int(clients[int(mod)]['max_tokens'])*2
220
- if not history:history=[prompt_in]
221
  while go == True:
222
 
223
  seed = random.randint(1,9999999999999)
 
46
  client=InferenceClient(clients[int(mod)]['name'])
47
  client_tok=clients[int(mod)]['max_tokens']
48
  good_seed=[947385642222,7482965345792,8584806344673]
49
+
 
50
  if not os.path.isdir(loc_folder):os.mkdir(loc_folder)
51
 
52
  if os.path.isfile(f'{loc_folder}/{loc_file}.json'):
 
216
  com=""
217
  go=True
218
  MAX_DATA=int(clients[int(mod)]['max_tokens'])*2
219
+ if not history:history=[{'role':'user','content':prompt_in}]
220
  while go == True:
221
 
222
  seed = random.randint(1,9999999999999)