Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ config = {
|
|
13 |
}
|
14 |
|
15 |
wandb.login(key = wandb_api_key)
|
16 |
-
wandb.init(project = "vertex-ai-
|
17 |
config = wandb.config
|
18 |
|
19 |
credentials = json.loads(credentials)
|
@@ -29,7 +29,7 @@ vertexai.init(project = project,
|
|
29 |
credentials = credentials)
|
30 |
|
31 |
from vertexai.language_models import TextGenerationModel
|
32 |
-
generation_model = TextGenerationModel.from_pretrained(
|
33 |
|
34 |
def invoke(prompt):
|
35 |
completion = generation_model.predict(prompt = prompt).text
|
|
|
13 |
}
|
14 |
|
15 |
wandb.login(key = wandb_api_key)
|
16 |
+
wandb.init(project = "vertex-ai-llm", config = config)
|
17 |
config = wandb.config
|
18 |
|
19 |
credentials = json.loads(credentials)
|
|
|
29 |
credentials = credentials)
|
30 |
|
31 |
from vertexai.language_models import TextGenerationModel
|
32 |
+
generation_model = TextGenerationModel.from_pretrained(config.model)
|
33 |
|
34 |
def invoke(prompt):
|
35 |
completion = generation_model.predict(prompt = prompt).text
|