Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
# gr.write("Upload an image to check if it's AI-generated")
|
11 |
|
12 |
|
13 |
-
# api_key =
|
14 |
# gr.session_state.api_key = api_key
|
15 |
|
16 |
# def process_image(image_bytes, api_key):
|
@@ -119,7 +119,7 @@ import io
|
|
119 |
def process_image(image):
|
120 |
"""Process the uploaded image using NVIDIA's AI detection API"""
|
121 |
# Get API key from environment variable for security
|
122 |
-
api_key = '
|
123 |
if not api_key:
|
124 |
raise ValueError("NVIDIA API key not found in environment variables")
|
125 |
|
|
|
10 |
# gr.write("Upload an image to check if it's AI-generated")
|
11 |
|
12 |
|
13 |
+
# api_key = NVIDIA_API_KEY
|
14 |
# gr.session_state.api_key = api_key
|
15 |
|
16 |
# def process_image(image_bytes, api_key):
|
|
|
119 |
def process_image(image):
|
120 |
"""Process the uploaded image using NVIDIA's AI detection API"""
|
121 |
# Get API key from environment variable for security
|
122 |
+
api_key = os.getenv('NVIDIA_API_KEY')
|
123 |
if not api_key:
|
124 |
raise ValueError("NVIDIA API key not found in environment variables")
|
125 |
|