noumanjavaid commited on
Commit
cd03e33
·
verified ·
1 Parent(s): 3ebc13c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 = "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"
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 = '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'
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