Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,14 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
-
|
|
|
|
| 4 |
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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()
|