NoaiGPT commited on
Commit
8224d2b
1 Parent(s): 0b75af5
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -1,3 +1,14 @@
1
  import gradio as gr
 
2
 
3
- gr.load("models/NoaiGPT/777").launch()
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
+ import os
3
 
4
+ # Get the Hugging Face token from the environment variable
5
+ hf_token = os.getenv("hf_token")
6
+
7
+ 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", api_key=hf_token)
12
+
13
+ # Launch the Gradio interface
14
+ interface.launch()