Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,7 @@ import os
|
|
8 |
from datetime import datetime
|
9 |
from typing import List, Dict
|
10 |
import requests
|
|
|
11 |
import gradio as gr
|
12 |
import atexit
|
13 |
import subprocess
|
@@ -22,7 +23,7 @@ warnings.filterwarnings('ignore', category=UserWarning)
|
|
22 |
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
|
23 |
|
24 |
def initialize_zero_gpu():
|
25 |
-
"""Initialize Hugging Face ZeroGPU"""
|
26 |
logger.info("Initializing Hugging Face ZeroGPU...")
|
27 |
try:
|
28 |
# Check if CUDA is available
|
|
|
8 |
from datetime import datetime
|
9 |
from typing import List, Dict
|
10 |
import requests
|
11 |
+
from huggingface_hub import login # Importing Hugging Face Spaces
|
12 |
import gradio as gr
|
13 |
import atexit
|
14 |
import subprocess
|
|
|
23 |
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
|
24 |
|
25 |
def initialize_zero_gpu():
|
26 |
+
"""Initialize Hugging Face ZeroGPU and handle Hugging Face Spaces"""
|
27 |
logger.info("Initializing Hugging Face ZeroGPU...")
|
28 |
try:
|
29 |
# Check if CUDA is available
|