yifehuang97 commited on
Commit
92abdcc
·
verified ·
1 Parent(s): db36b9f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -12,8 +12,9 @@ model = None
12
  processor = None
13
  device = None
14
 
 
15
  # Configure Gemini
16
- genai.configure(api_key='AIzaSyApqa65vVYTmw4FC4wP-6-_xpBLxXdctxE')
17
  gemini_model = genai.GenerativeModel("gemini-2.0-flash")
18
 
19
  PARSING_PROMPT = """Parse sentences of the form "Count A, not B" into two lists—A (include) and B (exclude)—splitting on "and", "or", and commas, and reattaching shared head nouns (e.g., "red and black beans" → "red beans", "black beans").
 
12
  processor = None
13
  device = None
14
 
15
+ gemini_api_key = os.environ.get("GEMINI_API_KEY")
16
  # Configure Gemini
17
+ genai.configure(api_key=gemini_api_key)
18
  gemini_model = genai.GenerativeModel("gemini-2.0-flash")
19
 
20
  PARSING_PROMPT = """Parse sentences of the form "Count A, not B" into two lists—A (include) and B (exclude)—splitting on "and", "or", and commas, and reattaching shared head nouns (e.g., "red and black beans" → "red beans", "black beans").