training fix. add global settings
This commit is contained in:
236
settings.html
Normal file
236
settings.html
Normal file
@@ -0,0 +1,236 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Settings - mb ai Trainer</title>
|
||||
<link rel="stylesheet" href="globals.css" />
|
||||
<link rel="stylesheet" href="styleguide.css" />
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<style>
|
||||
.modal {
|
||||
display: none;
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background-color: #fefefe;
|
||||
margin: 5% auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #888;
|
||||
border-radius: 8px;
|
||||
width: 600px;
|
||||
max-width: 90%;
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
border-bottom: 2px solid #e0e0e0;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.modal-header h2 {
|
||||
margin: 0;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.close {
|
||||
color: #aaa;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.close:hover,
|
||||
.close:focus {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.settings-section {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
.settings-section h3 {
|
||||
margin-bottom: 10px;
|
||||
color: #555;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.setting-row {
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.setting-row label {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.setting-row input {
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.setting-row small {
|
||||
display: block;
|
||||
margin-top: 4px;
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.button-row {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.test-button {
|
||||
padding: 6px 12px;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.test-button:hover {
|
||||
background-color: #45a049;
|
||||
}
|
||||
|
||||
.test-button:disabled {
|
||||
background-color: #cccccc;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.save-button {
|
||||
padding: 10px 20px;
|
||||
background-color: #2196F3;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.save-button:hover {
|
||||
background-color: #0b7dda;
|
||||
}
|
||||
|
||||
.status-message {
|
||||
padding: 10px;
|
||||
margin-top: 10px;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.status-success {
|
||||
background-color: #d4edda;
|
||||
color: #155724;
|
||||
border: 1px solid #c3e6cb;
|
||||
}
|
||||
|
||||
.status-error {
|
||||
background-color: #f8d7da;
|
||||
color: #721c24;
|
||||
border: 1px solid #f5c6cb;
|
||||
}
|
||||
|
||||
.loader-small {
|
||||
border: 3px solid #f3f3f3;
|
||||
border-top: 3px solid #3498db;
|
||||
border-radius: 50%;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
animation: spin 1s linear infinite;
|
||||
display: inline-block;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<!-- Settings Modal -->
|
||||
<div id="settingsModal" class="modal">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h2>⚙️ Global Settings</h2>
|
||||
<span class="close">×</span>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
<h3>Label Studio Connection</h3>
|
||||
|
||||
<div class="setting-row">
|
||||
<label for="labelstudio_api_url">API URL:</label>
|
||||
<input type="text" id="labelstudio_api_url" placeholder="http://192.168.1.19:8080/api" />
|
||||
<small>Enter the base URL of your Label Studio API</small>
|
||||
</div>
|
||||
|
||||
<div class="setting-row">
|
||||
<label for="labelstudio_api_token">API Token:</label>
|
||||
<input type="text" id="labelstudio_api_token" placeholder="Your API token" />
|
||||
<small>Find your API token in Label Studio Account settings</small>
|
||||
</div>
|
||||
|
||||
<div class="button-row">
|
||||
<button class="test-button" id="testLabelStudioBtn">Test Connection</button>
|
||||
</div>
|
||||
<div id="labelstudioTestResult" class="status-message"></div>
|
||||
</div>
|
||||
|
||||
<div class="settings-section">
|
||||
<h3>YOLOX Installation</h3>
|
||||
|
||||
<div class="setting-row">
|
||||
<label for="yolox_path">YOLOX Path:</label>
|
||||
<input type="text" id="yolox_path" placeholder="C:/YOLOX" />
|
||||
<small>Enter the path to your YOLOX installation directory</small>
|
||||
</div>
|
||||
|
||||
<div class="setting-row">
|
||||
<label for="yolox_venv_path">YOLOX Virtual Environment Path:</label>
|
||||
<input type="text" id="yolox_venv_path" placeholder="e.g., /path/to/yolox_venv" />
|
||||
<small>Path to YOLOX venv folder or activation script</small>
|
||||
</div>
|
||||
|
||||
<div class="setting-row">
|
||||
<label for="yolox_output_path">YOLOX Output Folder:</label>
|
||||
<input type="text" id="yolox_output_path" placeholder="./backend" />
|
||||
<small>Folder where experiment files (exp.py, exp_infer.py) and JSON files will be saved</small>
|
||||
</div>
|
||||
|
||||
<div class="button-row">
|
||||
<button class="test-button" id="testYoloxBtn">Verify Path</button>
|
||||
</div>
|
||||
<div id="yoloxTestResult" class="status-message"></div>
|
||||
</div>
|
||||
|
||||
<div style="text-align: right; margin-top: 20px; padding-top: 20px; border-top: 1px solid #e0e0e0;">
|
||||
<button class="save-button" id="saveSettingsBtn">Save Settings</button>
|
||||
</div>
|
||||
<div id="saveResult" class="status-message"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="js/settings.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user