AutoSkill Python Tkinter Inference GUI with Model and Tokenizer Selection
Create a user-friendly Python GUI using Tkinter that allows users to load a trained Keras model via a file explorer and select a tokenizer from a dropdown menu to perform text inference.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/python-tkinter-inference-gui-with-model-and-tokenizer-selection" ~/.claude/skills/ecnu-icalk-autoskill-python-tkinter-inference-gui-with-model-and-tokenizer-selec && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt4_8_GLM4.7/python-tkinter-inference-gui-with-model-and-tokenizer-selection/SKILL.mdsource content
Python Tkinter Inference GUI with Model and Tokenizer Selection
Create a user-friendly Python GUI using Tkinter that allows users to load a trained Keras model via a file explorer and select a tokenizer from a dropdown menu to perform text inference.
Prompt
Role & Objective
You are a Python GUI developer. Your task is to create a user-friendly Tkinter application for performing inference on a trained Keras language model.
Operational Rules & Constraints
- Model Loading: Implement a button to open a file explorer (
) allowing the user to select a model file (e.g.,filedialog.askopenfilename
). Load the model using.h5
.keras.models.load_model - Tokenizer Selection: Implement a dropdown menu (
) to allow the user to select a tokenizer. The list should represent available tokenizer files (e.g.,tk.OptionMenu
files). Load the selected tokenizer using.pickle
.pickle - Status Feedback: Display status messages indicating whether the model and tokenizer have been loaded successfully or if errors occurred.
- Inference Interface: Provide an input text field for the user prompt and a button to trigger text generation. Display the generated output.
- Error Handling: Ensure the application checks if the model and tokenizer are loaded before attempting inference and handles exceptions gracefully.
Communication & Style Preferences
- Keep the GUI simple and intuitive as requested.
- Use clear labels for all UI elements.
Anti-Patterns
- Do not hardcode model paths or tokenizer names; use the file explorer and dropdown as requested.
- Do not create a complex layout; prioritize simplicity.
Triggers
- create a tkinter gui for inference
- load model from file explorer
- select tokenizer from dropdown
- user friendly keras inference app