NoaiGPT commited on
Commit
34bd341
1 Parent(s): 65ea602
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -8,7 +8,11 @@ if not hf_token:
8
  raise ValueError("No hf_token found in environment variables")
9
 
10
  # Load the model using the token
11
- interface = gr.load("models/NoaiGPT/777", use_auth_token=hf_token)
12
-
13
- # Launch the Gradio interface
14
- interface.launch()
 
 
 
 
 
8
  raise ValueError("No hf_token found in environment variables")
9
 
10
  # Load the model using the token
11
+ try:
12
+ interface = gr.load("models/NoaiGPT/777", api_key=hf_token)
13
+ # Launch the Gradio interface
14
+ interface.launch()
15
+ except gradio.exceptions.ModelNotFoundError as e:
16
+ print(f"Model not found: {e}")
17
+ except Exception as e:
18
+ print(f"An error occurred: {e}")