raygiles3 commited on
Commit
b2111c8
·
verified ·
1 Parent(s): 56e4c50

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -16,14 +16,14 @@ login(token=hf_api_token, add_to_git_credential=True)
16
 
17
 
18
  # Define the local directory where the model will be saved
19
- local_model_dir = "./LlamaGuard-7b"
20
 
21
  # Create the directory if it doesn't exist
22
  os.makedirs(local_model_dir, exist_ok=True)
23
 
24
  # Download the model and tokenizer
25
- model = AutoModelForCausalLM.from_pretrained("meta-llama/LlamaGuard-7b", cache_dir=local_model_dir)
26
- tokenizer = AutoTokenizer.from_pretrained("meta-llama/LlamaGuard-7b", cache_dir=local_model_dir)
27
 
28
  # Initialize the Whisper processor and model
29
  whisper_processor = WhisperProcessor.from_pretrained("openai/whisper-base")
 
16
 
17
 
18
  # Define the local directory where the model will be saved
19
+ local_model_dir = "meta-llama/Llama-2-7b-chat"
20
 
21
  # Create the directory if it doesn't exist
22
  os.makedirs(local_model_dir, exist_ok=True)
23
 
24
  # Download the model and tokenizer
25
+ model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-2-7b-chat", cache_dir=local_model_dir)
26
+ tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-2-7b-chat", cache_dir=local_model_dir)
27
 
28
  # Initialize the Whisper processor and model
29
  whisper_processor = WhisperProcessor.from_pretrained("openai/whisper-base")