Dimitre commited on
Commit
ac51a1c
1 Parent(s): d8e827d

Improving logs

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. hf_utils.py +1 -0
app.py CHANGED
@@ -18,10 +18,10 @@ configs = {
18
  "os_model": "google/gemma-2b-it",
19
  "device": "cpu",
20
  "generation_config": {
21
- "max_output_tokens": 256,
22
  "temperature": 1,
23
  "top_p": 1,
24
- "top_k": 32,
25
  },
26
  }
27
 
 
18
  "os_model": "google/gemma-2b-it",
19
  "device": "cpu",
20
  "generation_config": {
21
+ "max_output_tokens": 128,
22
  "temperature": 1,
23
  "top_p": 1,
24
+ "top_k": 4,
25
  },
26
  }
27
 
hf_utils.py CHANGED
@@ -65,6 +65,7 @@ def query_word(
65
  matched_word = ""
66
  while not matched_word:
67
  word = query_hf(query, model, tokenizer, generation_config, device)
 
68
 
69
  # Extract word of interest from Gemma's output
70
  for pattern in GEMMA_WORD_PATTERNS:
 
65
  matched_word = ""
66
  while not matched_word:
67
  word = query_hf(query, model, tokenizer, generation_config, device)
68
+ logger.info(f"Evaluating result: '{word}'...")
69
 
70
  # Extract word of interest from Gemma's output
71
  for pattern in GEMMA_WORD_PATTERNS: