jdoexbox360 commited on
Commit
ea6fc06
1 Parent(s): c225dd9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -18,6 +18,7 @@ def output(prompt, output_length):
18
  global convo
19
  if prompt=="clear_convo()":
20
  convo = ""
 
21
  sentence = convo + '\n' + script_speaker_name + ': ' + prompt + '\n' + script_responder_name + ': '
22
  input_ids = tokenizer.encode(sentence, return_tensors='pt')
23
  # generate text until the output length (which includes the context length) reaches 50
 
18
  global convo
19
  if prompt=="clear_convo()":
20
  convo = ""
21
+ prompt = prompt.split("clear_convo()")[1].strip()
22
  sentence = convo + '\n' + script_speaker_name + ': ' + prompt + '\n' + script_responder_name + ': '
23
  input_ids = tokenizer.encode(sentence, return_tensors='pt')
24
  # generate text until the output length (which includes the context length) reaches 50