Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,13 +3,13 @@ import gradio as gr
|
|
3 |
import requests
|
4 |
|
5 |
# Retrieve the API token from environment variables
|
6 |
-
api_token = os.getenv("
|
7 |
if not api_token:
|
8 |
-
raise ValueError("
|
9 |
|
10 |
# Hugging Face Inference API Details
|
11 |
API_URL = "https://api-inference.huggingface.co/models/meta-llama/Llama-3.2-1B-Instruct"
|
12 |
-
HEADERS = {"Authorization": f"Bearer {
|
13 |
|
14 |
|
15 |
def generate_exegesis(passage):
|
|
|
3 |
import requests
|
4 |
|
5 |
# Retrieve the API token from environment variables
|
6 |
+
api_token = os.getenv("MODEL_REPO_ID")
|
7 |
if not api_token:
|
8 |
+
raise ValueError("MODEL_REPO_ID token not found. Please set the API_TOKEN environment variable.")
|
9 |
|
10 |
# Hugging Face Inference API Details
|
11 |
API_URL = "https://api-inference.huggingface.co/models/meta-llama/Llama-3.2-1B-Instruct"
|
12 |
+
HEADERS = {"Authorization": f"Bearer {MODEL_REPO_ID}"}
|
13 |
|
14 |
|
15 |
def generate_exegesis(passage):
|