Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,8 +12,9 @@ model = None
|
|
| 12 |
processor = None
|
| 13 |
device = None
|
| 14 |
|
|
|
|
| 15 |
# Configure Gemini
|
| 16 |
-
genai.configure(api_key=
|
| 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").
|