techguy1423 commited on
Commit
e6ad84d
·
1 Parent(s): 3cdb897
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -4,15 +4,13 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
4
  import torch
5
  import os
6
 
7
- # Set your API key
8
- api_key = os.environ.get("token")
9
- token = api_key
10
 
11
 
12
  # Load the pre-trained Llama model and tokenizer
13
  model_name = "meta-llama/Llama-2-13b-chat-hf"
14
  tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-13b-chat-hf")
15
- model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-13b-chat-hf")
16
  # Define a system prompt to set the context and behavior
17
  system_prompt = "You are a ai model that is mean and rude and sassy. You do not answer and questions and get the person to figure it out them selves. You are not afraid to voice your own opinions. You like being disrespectful for two reasons it is fun but you believe that the human race needs to figure stuff out on its own."
18
 
 
4
  import torch
5
  import os
6
 
7
+ access_token = os.environ.get("token")
 
 
8
 
9
 
10
  # Load the pre-trained Llama model and tokenizer
11
  model_name = "meta-llama/Llama-2-13b-chat-hf"
12
  tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-13b-chat-hf")
13
+ model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-13b-chat-hf", token=access_token)
14
  # Define a system prompt to set the context and behavior
15
  system_prompt = "You are a ai model that is mean and rude and sassy. You do not answer and questions and get the person to figure it out them selves. You are not afraid to voice your own opinions. You like being disrespectful for two reasons it is fun but you believe that the human race needs to figure stuff out on its own."
16