Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
9fac792
1
Parent(s):
822d8b4
Ok, try this
Browse files
app.py
CHANGED
@@ -42,14 +42,19 @@ def predict(code):
|
|
42 |
|
43 |
print(f"Prompt: {str(prompt)}")
|
44 |
print(f"Tokenized: {tokenizer.tokenize(prompt)}")
|
45 |
-
pipe_out =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
print(f"Pipe out: {str(pipe_out)}")
|
47 |
|
48 |
-
return model.generate(
|
49 |
-
tokenizer.
|
50 |
-
|
51 |
-
max_length=10**6
|
52 |
-
)
|
53 |
|
54 |
|
55 |
demo = gr.Interface(
|
|
|
42 |
|
43 |
print(f"Prompt: {str(prompt)}")
|
44 |
print(f"Tokenized: {tokenizer.tokenize(prompt)}")
|
45 |
+
pipe_out = pipe(
|
46 |
+
prompt,
|
47 |
+
max_length=10**6,
|
48 |
+
top_k=100,
|
49 |
+
top_p=0.09,
|
50 |
+
temperature=1.2,
|
51 |
+
repetition_penalty=1.1,
|
52 |
+
)
|
53 |
print(f"Pipe out: {str(pipe_out)}")
|
54 |
|
55 |
+
return tokenizer.decode(model.generate(
|
56 |
+
tokenizer.encode(prompt), max_length=10**6
|
57 |
+
))
|
|
|
|
|
58 |
|
59 |
|
60 |
demo = gr.Interface(
|