willn9 commited on
Commit
d376395
·
verified ·
1 Parent(s): 67de03d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -10,15 +10,23 @@ project_id= os.getenv("project_id")
10
 
11
  # Model and project settings
12
  model_id = "meta-llama/llama-2-13b-chat" # Directly specifying the LLAMA2 model
 
 
 
 
13
 
14
  # Generation parameters
15
  gen_parms = {
16
  "max_new_tokens": 512, # Adjust as needed for the length of the cover letter
17
  "temperature": 0.7 # Adjust for creativity
18
  }
 
 
 
19
 
20
  # Initialize the model
21
- model = Model(model_id, watsonx_API, gen_parms, project_id)
 
22
 
23
  # Function to generate customized career advice
24
  def generate_career_advice(field, position_name, current_qualifications, likes, skills):
 
10
 
11
  # Model and project settings
12
  model_id = "meta-llama/llama-2-13b-chat" # Directly specifying the LLAMA2 model
13
+ # Set credentials to use the model
14
+ my_credentials = {
15
+ "url": "https://us-south.ml.cloud.ibm.com"
16
+ }
17
 
18
  # Generation parameters
19
  gen_parms = {
20
  "max_new_tokens": 512, # Adjust as needed for the length of the cover letter
21
  "temperature": 0.7 # Adjust for creativity
22
  }
23
+ project_id = "skills-network"
24
+ space_id = None
25
+ verify = False
26
 
27
  # Initialize the model
28
+ model = Model(model_id, my_credentials, gen_parms, project_id, space_id, verify)
29
+
30
 
31
  # Function to generate customized career advice
32
  def generate_career_advice(field, position_name, current_qualifications, likes, skills):