Alon Mota commited on
Commit ·
34330fc
1
Parent(s): 926027b
test
Browse files
app.py
CHANGED
|
@@ -7,11 +7,12 @@ print("Starting")
|
|
| 7 |
device = "cpu"
|
| 8 |
|
| 9 |
checkpoint = "mishasadhaker/codet5_large_typescript"
|
|
|
|
| 10 |
|
| 11 |
-
tokenizer = AutoTokenizer.from_pretrained(checkpoint, local_files_only=
|
| 12 |
|
| 13 |
print("Loading Model")
|
| 14 |
-
model = T5ForConditionalGeneration.from_pretrained(checkpoint, local_files_only=
|
| 15 |
print("Model Loaded")
|
| 16 |
|
| 17 |
def completeCode(prompt):
|
|
|
|
| 7 |
device = "cpu"
|
| 8 |
|
| 9 |
checkpoint = "mishasadhaker/codet5_large_typescript"
|
| 10 |
+
local = False
|
| 11 |
|
| 12 |
+
tokenizer = AutoTokenizer.from_pretrained(checkpoint, local_files_only=local)
|
| 13 |
|
| 14 |
print("Loading Model")
|
| 15 |
+
model = T5ForConditionalGeneration.from_pretrained(checkpoint, local_files_only=local).to(device)
|
| 16 |
print("Model Loaded")
|
| 17 |
|
| 18 |
def completeCode(prompt):
|