Spaces:
Runtime error
Runtime error
Commit
·
9b11bf4
1
Parent(s):
e01d0a4
Update app.py
Browse files
app.py
CHANGED
@@ -32,10 +32,10 @@ def generation(tokenizer, model, content):
|
|
32 |
|
33 |
seek_token_ids = tokenizer.encode('= " +')[1:]
|
34 |
|
35 |
-
full_output =
|
36 |
|
37 |
def next_words(code, position, seek_token_ids):
|
38 |
-
op_model =
|
39 |
hidden_states = op_model.hidden_states
|
40 |
layer_no = len(hidden_states) - 1
|
41 |
h = hidden_states[-1]
|
|
|
32 |
|
33 |
seek_token_ids = tokenizer.encode('= " +')[1:]
|
34 |
|
35 |
+
full_output = model.generate(code, generate=6, do_sample=False)
|
36 |
|
37 |
def next_words(code, position, seek_token_ids):
|
38 |
+
op_model = model.generate(code, generate=1, do_sample=False)
|
39 |
hidden_states = op_model.hidden_states
|
40 |
layer_no = len(hidden_states) - 1
|
41 |
h = hidden_states[-1]
|