add pycache to gitignore

This commit is contained in:
Simon Larsen
2023-10-16 20:54:21 +01:00
parent d844fa9df2
commit 896dce3430
5 changed files with 16 additions and 26 deletions

4
.gitignore vendored
View File

@@ -94,4 +94,6 @@ Haraka/dkim/keys/public_base64.txt
HelmChart/Values/*.values.yaml
Llama/Models/tokenizer*
Llama/Models/llama*
Llama/Models/llama*
Llama/__pycache__/*

Binary file not shown.

View File

@@ -9,23 +9,12 @@ from pydantic import BaseModel
class Prompt(BaseModel):
prompt: str
# model_path = "./Models/Llama-2-7b-chat-hf"
model_path = "./Models/Llama-2-7b-chat-hf"
# tokenizer = AutoTokenizer.from_pretrained(model_path, local_files_only=True)
# pipeline = transformers.pipeline(
# "text-generation",
# model=model_path,
# torch_dtype=torch.float16,
# device_map="auto",
# )
model = "meta-llama/Llama-2-7b-chat-hf"
tokenizer = AutoTokenizer.from_pretrained(model)
tokenizer = AutoTokenizer.from_pretrained(model_path, local_files_only=True)
pipeline = transformers.pipeline(
"text-generation",
model=model,
model=model_path,
torch_dtype=torch.float16,
device_map="auto",
)

View File

@@ -106,7 +106,6 @@ const DashboardMasterPage: FunctionComponent<ComponentProps> = (
'user-token-' + decodedtoken.statusPageId.toString(),
token,
{
httpOnly: true,
path: new Route('/'),
}
);

View File

@@ -18,15 +18,15 @@ export default abstract class LoginUtil {
UserUtil.setEmail(statusPageId, user.email as Email);
UserUtil.setUserId(statusPageId, user.id as ObjectID);
// set token as cookie.
Cookie.setItem(
'user-token-' + statusPageId.toString(),
value['token'],
{
httpOnly: true,
path: new Route('/'),
}
);
if (value && value['token']) {
// set token as cookie.
Cookie.setItem(
'user-token-' + statusPageId.toString(),
value['token'],
{
path: new Route('/'),
}
);
}
}
}