diff options
| author | Pjotr Prins | 2026-03-27 18:03:39 +0100 |
|---|---|---|
| committer | Pjotr Prins | 2026-03-27 18:03:39 +0100 |
| commit | 976a1e4db165d967ed9ac2df8d9e02b3e77aff8b (patch) | |
| tree | 24d8821443c6c40938d11c004d22db7209951dbc /server.py | |
| parent | 9f2953afdccc79d05d0452c648b232aeb22adf9b (diff) | |
| download | genecup-976a1e4db165d967ed9ac2df8d9e02b3e77aff8b.tar.gz | |
gemini logs to the console
Diffstat (limited to 'server.py')
| -rwxr-xr-x | server.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server.py b/server.py index 868572e..bd3bd57 100755 --- a/server.py +++ b/server.py @@ -151,9 +151,11 @@ def classify_stress_with_gemini(sentence_text): try: # Call the API using the new Client + prompt_text = STRESS_PROMPT_TEMPLATE + f'\nSentence: {sentence_text}\nClassification:' + print(f"Gemini API call: few-shot stress classification (gemini-2.5-pro)\n Prompt: {prompt_text}") response = gemini_client.models.generate_content( model='gemini-2.5-pro', - contents=STRESS_PROMPT_TEMPLATE + f'\nSentence: {sentence_text}\nClassification:' + contents=prompt_text ) # We need to parse the classification from the response classification = response.text.strip().lower() @@ -186,6 +188,7 @@ Sentence: "{sentence_text}" Classification:""" + print(f"Gemini API call: zero-shot stress classification (gemini-2.5-pro)\n Prompt: {prompt}") response = gemini_client.models.generate_content( model='gemini-2.5-pro', contents=prompt @@ -1611,6 +1614,7 @@ Here are the sentences to classify: {sentences_to_classify_str} """ # Call the API using the new Client + print(f"Gemini API call: batch stress classification (gemini-3-flash-preview)\n Prompt: {batched_prompt}") response = gemini_client.models.generate_content( model='gemini-3-flash-preview', contents=batched_prompt |
