Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ import traceback
|
|
| 12 |
# ==============================================================
|
| 13 |
# API Configuration - Add your key here
|
| 14 |
# ==============================================================
|
| 15 |
-
GEMINI_API_KEY = "
|
| 16 |
|
| 17 |
# ==============================================================
|
| 18 |
# Enhanced extraction prompt with better instructions
|
|
@@ -152,7 +152,7 @@ def process_files_for_gemini(files: List[str]) -> Dict[str, Any]:
|
|
| 152 |
return processed_data
|
| 153 |
|
| 154 |
|
| 155 |
-
def extract_with_gemini(processed_data: Dict[str, Any], api_key: str, model_name: str = "gemini-2.0-flash
|
| 156 |
"""Extract structured data using Gemini with enhanced multimodal processing"""
|
| 157 |
|
| 158 |
if not api_key or api_key.strip() == "":
|
|
|
|
| 12 |
# ==============================================================
|
| 13 |
# API Configuration - Add your key here
|
| 14 |
# ==============================================================
|
| 15 |
+
GEMINI_API_KEY = "AIzaSyDgNzVud08vXVrvFb5Mz0bHX8vBQ1LihNs" # Replace with your key
|
| 16 |
|
| 17 |
# ==============================================================
|
| 18 |
# Enhanced extraction prompt with better instructions
|
|
|
|
| 152 |
return processed_data
|
| 153 |
|
| 154 |
|
| 155 |
+
def extract_with_gemini(processed_data: Dict[str, Any], api_key: str, model_name: str = "gemini-2.0-flash") -> Dict[str, Any]:
|
| 156 |
"""Extract structured data using Gemini with enhanced multimodal processing"""
|
| 157 |
|
| 158 |
if not api_key or api_key.strip() == "":
|