Add config.json support with auto-populate and reset features

- Added ConfigParser module for parsing Hugging Face config files
- Added model name display above form
- Added file upload for config.json (accepts only .json files)
- Added reset button to clear all fields
- Added error indicators (!) with language-aware messages for missing fields
- Auto-populates fields: num_hidden_layers, num_key_value_heads, head_dim,
  num_attention_heads, max_position_embeddings, full_attention_interval
- Sets defaults for optional fields: parallel=1, model_size=0
- Auto-calculates after successful config upload
- Default quantization set to f16
This commit is contained in:
Arseniy Romenskiy 2026-04-12 01:12:53 +03:00
parent c471e1d0a9
commit b8352ebd17
3 changed files with 290 additions and 1 deletions

View file

@ -300,6 +300,49 @@ html[lang="en"] .tooltip-icon:hover::after {
text-align: left;
}
.model-name {
text-align: center;
font-weight: bold;
margin-bottom: 15px;
color: #0000FF;
}
.error-icon {
display: none;
font-size: 14px;
font-weight: bold;
line-height: 1;
cursor: help;
user-select: none;
}
.error-icon:hover::after {
content: attr(data-tooltip);
position: absolute;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
background-color: #FF0000;
color: #FFFFFF;
padding: 8px 12px;
font-size: 11px;
white-space: pre-wrap;
max-width: 300px;
z-index: 1000;
line-height: 1.4;
text-align: center;
}
#reset-btn {
background-color: #333333;
width: auto;
padding: 8px 16px;
}
#reset-btn:hover {
background-color: #555555;
}
@media (max-width: 600px) {
.container {
padding: 15px;