bstraehle commited on
Commit
ace8c2c
·
1 Parent(s): 192ee32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -1,12 +1,22 @@
1
  import gradio as gr
2
- import json, os, vertexai
3
 
4
  from dotenv import load_dotenv, find_dotenv
5
  _ = load_dotenv(find_dotenv())
6
 
 
 
 
 
 
 
7
  credentials = os.environ["CREDENTIALS"]
8
  project = os.environ["PROJECT"]
9
 
 
 
 
 
10
  credentials = json.loads(credentials)
11
 
12
  from google.oauth2 import service_account
 
1
  import gradio as gr
2
+ import json, os, vertexai, wandb
3
 
4
  from dotenv import load_dotenv, find_dotenv
5
  _ = load_dotenv(find_dotenv())
6
 
7
+ config = {
8
+ "model": "text-bison@001",
9
+ "temperature": 0,
10
+ }
11
+
12
+ wandb_api_key = os.environ["WANDB_API_KEY"]
13
  credentials = os.environ["CREDENTIALS"]
14
  project = os.environ["PROJECT"]
15
 
16
+ wandb.login(key = wandb_api_key)
17
+ wandb.init(project = "genai-txt", config = config)
18
+ config = wandb.config
19
+
20
  credentials = json.loads(credentials)
21
 
22
  from google.oauth2 import service_account