Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,6 +4,13 @@ import gradio as gr
|
|
| 4 |
import os
|
| 5 |
from huggingface_hub import InferenceClient
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
############################## Define tools Section ###############################
|
| 8 |
def test_api_connection(query: str, api_key: str) -> str:
|
| 9 |
"""Tests the Hugging Face Inference API connection with the provided API key."""
|
|
|
|
| 4 |
import os
|
| 5 |
from huggingface_hub import InferenceClient
|
| 6 |
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
api_key = os.getenv("WingTokenAll")
|
| 10 |
+
print(f"API Key Retrieved: {api_key is not None}") # Debug line
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
|
| 14 |
############################## Define tools Section ###############################
|
| 15 |
def test_api_connection(query: str, api_key: str) -> str:
|
| 16 |
"""Tests the Hugging Face Inference API connection with the provided API key."""
|