Spaces:
Runtime error
Runtime error
jdoexbox360
commited on
Commit
•
1295f17
1
Parent(s):
1b1006b
Update app.py
Browse files
app.py
CHANGED
@@ -13,6 +13,8 @@ script_speaker_name = "person alpha"
|
|
13 |
script_responder_name = "person beta"
|
14 |
def output(prompt, output_length):
|
15 |
global convo
|
|
|
|
|
16 |
sentence = convo + '\n' + script_speaker_name + ': ' + prompt + '\n' + script_responder_name + ': '
|
17 |
input_ids = tokenizer.encode(sentence, return_tensors='pt')
|
18 |
# generate text until the output length (which includes the context length) reaches 50
|
|
|
13 |
script_responder_name = "person beta"
|
14 |
def output(prompt, output_length):
|
15 |
global convo
|
16 |
+
if prompt=="clear_convo()":
|
17 |
+
convo = ""
|
18 |
sentence = convo + '\n' + script_speaker_name + ': ' + prompt + '\n' + script_responder_name + ': '
|
19 |
input_ids = tokenizer.encode(sentence, return_tensors='pt')
|
20 |
# generate text until the output length (which includes the context length) reaches 50
|