mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
add pycache to gitignore
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -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.
17
Llama/app.py
17
Llama/app.py
@@ -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",
|
||||
)
|
||||
|
||||
@@ -106,7 +106,6 @@ const DashboardMasterPage: FunctionComponent<ComponentProps> = (
|
||||
'user-token-' + decodedtoken.statusPageId.toString(),
|
||||
token,
|
||||
{
|
||||
httpOnly: true,
|
||||
path: new Route('/'),
|
||||
}
|
||||
);
|
||||
|
||||
@@ -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('/'),
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user