Josebert commited on
Commit
8c9af36
·
verified ·
1 Parent(s): 59b0b83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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("API_TOKEN")
7
  if not api_token:
8
- raise ValueError("API 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 {api_token}"}
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):