Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,15 +1,16 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
-
from huggingface_hub import InferenceClient
|
| 4 |
import random
|
| 5 |
from typing import Generator, Dict, List, Tuple, Optional
|
| 6 |
import logging # Added logging for better debugging
|
| 7 |
|
| 8 |
-
# Configure logging with DEBUG level
|
| 9 |
logging.basicConfig(
|
| 10 |
level=logging.DEBUG,
|
| 11 |
format='%(asctime)s - %(levelname)s - %(message)s'
|
| 12 |
)
|
|
|
|
| 13 |
|
| 14 |
# Get token from environment variable
|
| 15 |
hf_token = os.environ.get("HF_TOKEN")
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import os
|
| 3 |
+
from huggingface_hub import InferenceClient, __version__ as hf_version
|
| 4 |
import random
|
| 5 |
from typing import Generator, Dict, List, Tuple, Optional
|
| 6 |
import logging # Added logging for better debugging
|
| 7 |
|
| 8 |
+
# Configure logging with DEBUG level and add version info
|
| 9 |
logging.basicConfig(
|
| 10 |
level=logging.DEBUG,
|
| 11 |
format='%(asctime)s - %(levelname)s - %(message)s'
|
| 12 |
)
|
| 13 |
+
logging.debug(f"Using huggingface_hub version: {hf_version}")
|
| 14 |
|
| 15 |
# Get token from environment variable
|
| 16 |
hf_token = os.environ.get("HF_TOKEN")
|