Spaces:
Runtime error
Runtime error
aronvandepol
commited on
Commit
•
5a96c7d
1
Parent(s):
4b3c7fe
Update app.py
Browse files
app.py
CHANGED
@@ -4,14 +4,11 @@ import os
|
|
4 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
5 |
|
6 |
auth_token = os.environ['TOKEN']
|
7 |
-
print(auth_token)
|
8 |
|
9 |
model = AutoModelForCausalLM.from_pretrained("aronvandepol/K-GPT125M", use_auth_token=auth_token)
|
10 |
|
11 |
tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neo-125M")
|
12 |
|
13 |
-
model = AutoModelForCausalLM.from_pretrained("K-GPT_NEO125M")
|
14 |
-
|
15 |
def get_gen(sample: str, length: int=30, beam: int =1):
|
16 |
input_ids = tokenizer(sample, return_tensors='pt').input_ids
|
17 |
output = model.generate(input_ids,
|
|
|
4 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
5 |
|
6 |
auth_token = os.environ['TOKEN']
|
|
|
7 |
|
8 |
model = AutoModelForCausalLM.from_pretrained("aronvandepol/K-GPT125M", use_auth_token=auth_token)
|
9 |
|
10 |
tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neo-125M")
|
11 |
|
|
|
|
|
12 |
def get_gen(sample: str, length: int=30, beam: int =1):
|
13 |
input_ids = tokenizer(sample, return_tensors='pt').input_ids
|
14 |
output = model.generate(input_ids,
|