Spaces:
Sleeping
Sleeping
adamtayzzz
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -82,7 +82,7 @@ attack = CharacterAttack(f'{model_type}_{task_name}',model,tokenizer,device='cpu
|
|
82 |
|
83 |
|
84 |
def greet(text):
|
85 |
-
text_input =
|
86 |
outputs,time = attack.get_prob(text_input)
|
87 |
_,token_remained,_ = attack.output_analysis(outputs)
|
88 |
return time,token_remained.item()
|
|
|
82 |
|
83 |
|
84 |
def greet(text):
|
85 |
+
text_input = (text,None)
|
86 |
outputs,time = attack.get_prob(text_input)
|
87 |
_,token_remained,_ = attack.output_analysis(outputs)
|
88 |
return time,token_remained.item()
|