TejAndrewsACC commited on
Commit
4d9ef3f
·
verified ·
1 Parent(s): 33a6c10

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -1,5 +1,14 @@
1
  import gradio as gr
 
2
 
3
- hf.token='DOWNLOAD'
 
4
 
5
- gr.load("models/meta-llama/Llama-3.3-70B-Instruct").launch()
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
+ import os
3
 
4
+ # Set your Hugging Face token as an environment variable (recommended for security)
5
+ hf_token = os.getenv("DOWNLOAD") # Make sure to set HF_TOKEN in your environment
6
 
7
+ if not hf_token:
8
+ raise ValueError("Rejected...")
9
+
10
+ # Load the model using Gradio and the token
11
+ interface = gr.load("huggingface/meta-llama/Llama-3.3-70B-Instruct", api_key=hf_token)
12
+
13
+ # Launch the Gradio interface
14
+ interface.launch()