Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ import os
|
|
6 |
API_URL = os.getenv("HF_API_URL", "https://api-inference.huggingface.co/models/your-model")
|
7 |
API_TOKEN = os.getenv("HF_API_TOKEN", "your-default-token") # Replace with your actual token for fallback
|
8 |
print(API_URL)
|
|
|
9 |
# Function to call the Hugging Face Inference API
|
10 |
def call_huggingface_api(input_text):
|
11 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
|
|
6 |
API_URL = os.getenv("HF_API_URL", "https://api-inference.huggingface.co/models/your-model")
|
7 |
API_TOKEN = os.getenv("HF_API_TOKEN", "your-default-token") # Replace with your actual token for fallback
|
8 |
print(API_URL)
|
9 |
+
print(f"Token: {'*****' if API_TOKEN else 'Token not set'}")
|
10 |
# Function to call the Hugging Face Inference API
|
11 |
def call_huggingface_api(input_text):
|
12 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|