Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ def predict_identifier(tokenizer,code):
|
|
20 |
code should be like: "unsigned __int8 *__cdecl <func>(int *<var_0>,...){ return <func_1>(1);}"
|
21 |
'''
|
22 |
input = tokenizer('identifier_predict: '+code,return_tensors='pt',max_length=max_input_length,truncation=True)
|
23 |
-
output = model.generate(**input
|
24 |
return tokenizer.decode(output)
|
25 |
|
26 |
|
|
|
20 |
code should be like: "unsigned __int8 *__cdecl <func>(int *<var_0>,...){ return <func_1>(1);}"
|
21 |
'''
|
22 |
input = tokenizer('identifier_predict: '+code,return_tensors='pt',max_length=max_input_length,truncation=True)
|
23 |
+
output = model.generate(**input)[0]
|
24 |
return tokenizer.decode(output)
|
25 |
|
26 |
|