HusseinEid commited on
Commit
de8a4df
·
verified ·
1 Parent(s): ac4c2b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -8,13 +8,10 @@ hf_token = os.environ.get("HF_TOKEN")
8
  model_repo = "HusseinEid/lora_model"
9
  config_file = "adapter_config.json"
10
 
11
- try:
12
- # Load the configuration directly from the repository
13
- config = AutoConfig.from_pretrained(model_repo, config_file_name=config_file, token=hf_token)
14
- # Load the model from Hugging Face using the config
15
- model = AutoModel.from_pretrained(model_repo, config=config, token=hf_token)
16
- except OSError as e:
17
- print(f"Error: {e}")
18
 
19
  client = Groq(api_key = os.environ.get("GROQ_API_KEY"), )
20
 
 
8
  model_repo = "HusseinEid/lora_model"
9
  config_file = "adapter_config.json"
10
 
11
+ # Load the configuration directly from the repository
12
+ config = AutoConfig.from_pretrained(model_repo, config_file_name=config_file, token=hf_token)
13
+ # Load the model from Hugging Face using the config
14
+ model = AutoModel.from_pretrained(model_repo, config=config, token=hf_token)
 
 
 
15
 
16
  client = Groq(api_key = os.environ.get("GROQ_API_KEY"), )
17