Sentdex commited on
Commit
e97893e
1 Parent(s): fc1ba61

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -2
README.md CHANGED
@@ -10,6 +10,20 @@ Considerations:
10
  4. Along with the above, this means the code generated could wind up doing or suggesting just about anything. Run the generated code at own risk...it could be *anything*
11
 
12
 
 
 
 
 
13
  ```py
14
- print("test")
15
- ```
 
 
 
 
 
 
 
 
 
 
 
10
  4. Along with the above, this means the code generated could wind up doing or suggesting just about anything. Run the generated code at own risk...it could be *anything*
11
 
12
 
13
+ Input to the model is code, up to the context length of 1024, with newlines replaced by `<N>`
14
+
15
+ Here's an example of a quick converter to take your multi-line code and replace the newlines:
16
+
17
  ```py
18
+ inp = """def do_something():
19
+ print("Hello")
20
+ """
21
+
22
+ newlinechar = "<N>"
23
+ converted = inp.replace("\n", newlinechar)
24
+ print("length:", len(converted))
25
+ print(converted)```
26
+
27
+ Should give you something like:
28
+ `def do_something():<N> print("Hello")<N>`
29
+ ...which is what the model is expecting as input.