Spaces:
Running on Zero
Running on Zero
Asmit Nayak commited on
Commit ·
3276d43
1
Parent(s): f784cc0
update
Browse files- py_files/gemini_analysis.py +3 -2
- requirements.txt +1 -1
py_files/gemini_analysis.py
CHANGED
|
@@ -285,8 +285,8 @@ def thinking_generator(eval_dir="./eval", files=None, api_key=None):
|
|
| 285 |
|
| 286 |
os.makedirs(f"{eval_dir}/gemini_fs", exist_ok=True)
|
| 287 |
try:
|
| 288 |
-
client = genai.Client(api_key=api_key
|
| 289 |
-
print(f"[CONSOLE] Thinking client initialized
|
| 290 |
except Exception as e:
|
| 291 |
error_msg = f"❌ Failed to initialize thinking client: {str(e)}"
|
| 292 |
print(f"[CONSOLE] Thinking client initialization failed: {e}")
|
|
@@ -325,6 +325,7 @@ def thinking_generator(eval_dir="./eval", files=None, api_key=None):
|
|
| 325 |
top_p=0.1,
|
| 326 |
top_k=1,
|
| 327 |
max_output_tokens=65536,
|
|
|
|
| 328 |
safety_settings=[
|
| 329 |
types.SafetySetting(category='HARM_CATEGORY_HARASSMENT', threshold='BLOCK_NONE'),
|
| 330 |
types.SafetySetting(category='HARM_CATEGORY_HATE_SPEECH', threshold='BLOCK_NONE'),
|
|
|
|
| 285 |
|
| 286 |
os.makedirs(f"{eval_dir}/gemini_fs", exist_ok=True)
|
| 287 |
try:
|
| 288 |
+
client = genai.Client(api_key=api_key)
|
| 289 |
+
print(f"[CONSOLE] Thinking client initialized")
|
| 290 |
except Exception as e:
|
| 291 |
error_msg = f"❌ Failed to initialize thinking client: {str(e)}"
|
| 292 |
print(f"[CONSOLE] Thinking client initialization failed: {e}")
|
|
|
|
| 325 |
top_p=0.1,
|
| 326 |
top_k=1,
|
| 327 |
max_output_tokens=65536,
|
| 328 |
+
thinking_config=types.ThinkingConfig(include_thoughts=True),
|
| 329 |
safety_settings=[
|
| 330 |
types.SafetySetting(category='HARM_CATEGORY_HARASSMENT', threshold='BLOCK_NONE'),
|
| 331 |
types.SafetySetting(category='HARM_CATEGORY_HATE_SPEECH', threshold='BLOCK_NONE'),
|
requirements.txt
CHANGED
|
@@ -4,7 +4,7 @@ numpy==1.24.3
|
|
| 4 |
Pillow>=10.0.0
|
| 5 |
extcolors==1.0.0
|
| 6 |
google-cloud-vision==3.4.4
|
| 7 |
-
google-genai>=0.
|
| 8 |
ultralytics>=8.0.196
|
| 9 |
--extra-index-url https://download.pytorch.org/whl/cu113
|
| 10 |
torch
|
|
|
|
| 4 |
Pillow>=10.0.0
|
| 5 |
extcolors==1.0.0
|
| 6 |
google-cloud-vision==3.4.4
|
| 7 |
+
google-genai>=2.0.0
|
| 8 |
ultralytics>=8.0.196
|
| 9 |
--extra-index-url https://download.pytorch.org/whl/cu113
|
| 10 |
torch
|