MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / print_progress_bar

Function print_progress_bar

DemoPrograms/Demo_Chatterbot_With_TTS.py:46–59  ·  view source on GitHub ↗
(description, iteration_counter, total_items, progress_bar_length=20)

Source from the content-addressed store, hash-verified

44
45# callback function for training runs
46def print_progress_bar(description, iteration_counter, total_items, progress_bar_length=20):
47 global current_bar
48 global bars
49 global texts
50 global training_window
51 # update the window and the bars
52 button, values = training_window.read(timeout=0)
53 if button is None: # if user closed the window on us, exit
54 return
55 if bars[current_bar].update_bar(iteration_counter, max=total_items) is False:
56 return
57 texts[current_bar].update(description) # show the training dataset name
58 if iteration_counter == total_items:
59 current_bar += 1
60
61def speak(text):
62 global i

Callers

nothing calls this directly

Calls 3

update_barMethod · 0.80
readMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected