Update app.py
Browse files
app.py
CHANGED
|
@@ -1107,7 +1107,7 @@ def build_interface(tinkeriq_app: TinkerIQApp):
|
|
| 1107 |
max-width: 1200px;
|
| 1108 |
margin: 0 auto;
|
| 1109 |
}
|
| 1110 |
-
|
| 1111 |
.tinkeriq-header {
|
| 1112 |
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 1113 |
padding: 2rem;
|
|
@@ -1117,7 +1117,7 @@ def build_interface(tinkeriq_app: TinkerIQApp):
|
|
| 1117 |
margin-bottom: 2rem;
|
| 1118 |
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 1119 |
}
|
| 1120 |
-
|
| 1121 |
.component-card {
|
| 1122 |
background: #f8fafc;
|
| 1123 |
border: 1px solid #e2e8f0;
|
|
@@ -1126,12 +1126,12 @@ def build_interface(tinkeriq_app: TinkerIQApp):
|
|
| 1126 |
margin: 0.5rem 0;
|
| 1127 |
transition: all 0.2s ease;
|
| 1128 |
}
|
| 1129 |
-
|
| 1130 |
.component-card:hover {
|
| 1131 |
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
| 1132 |
transform: translateY(-1px);
|
| 1133 |
}
|
| 1134 |
-
|
| 1135 |
.cost-summary {
|
| 1136 |
background: #edf2f7;
|
| 1137 |
border-left: 4px solid #667eea;
|
|
@@ -1139,22 +1139,107 @@ def build_interface(tinkeriq_app: TinkerIQApp):
|
|
| 1139 |
margin: 1rem 0;
|
| 1140 |
border-radius: 0 8px 8px 0;
|
| 1141 |
}
|
| 1142 |
-
|
| 1143 |
.tab-nav {
|
| 1144 |
background: #f7fafc;
|
| 1145 |
border-radius: 8px;
|
| 1146 |
padding: 0.5rem;
|
| 1147 |
}
|
| 1148 |
-
|
| 1149 |
.status-success {
|
| 1150 |
color: #38a169;
|
| 1151 |
font-weight: 600;
|
| 1152 |
}
|
| 1153 |
-
|
| 1154 |
.status-error {
|
| 1155 |
color: #e53e3e;
|
| 1156 |
font-weight: 600;
|
| 1157 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1158 |
"""
|
| 1159 |
|
| 1160 |
with gr.Blocks(css=enhanced_css, title="TinkerIQ - AI Maker Assistant") as app:
|
|
@@ -1193,9 +1278,9 @@ def build_interface(tinkeriq_app: TinkerIQApp):
|
|
| 1193 |
)
|
| 1194 |
|
| 1195 |
gr.HTML("""
|
| 1196 |
-
<div
|
| 1197 |
<h4>💡 Quick Tips:</h4>
|
| 1198 |
-
<ul
|
| 1199 |
<li>Upload circuit images for analysis</li>
|
| 1200 |
<li>Ask for code generation help</li>
|
| 1201 |
<li>Request BOM creation</li>
|
|
@@ -1323,9 +1408,9 @@ def build_interface(tinkeriq_app: TinkerIQApp):
|
|
| 1323 |
)
|
| 1324 |
|
| 1325 |
gr.HTML("""
|
| 1326 |
-
<div
|
| 1327 |
<h4>💡 BOM Features:</h4>
|
| 1328 |
-
<ul
|
| 1329 |
<li>Auto-generated from circuit analysis</li>
|
| 1330 |
<li>Real-time pricing from suppliers</li>
|
| 1331 |
<li>Multi-format export (CSV, JSON, PDF)</li>
|
|
@@ -1454,10 +1539,10 @@ def build_interface(tinkeriq_app: TinkerIQApp):
|
|
| 1454 |
module_status = gr.HTML(value=update_module_status())
|
| 1455 |
|
| 1456 |
gr.HTML("""
|
| 1457 |
-
<div
|
| 1458 |
<h4>🔧 Environment Setup</h4>
|
| 1459 |
<p>To enable all features, ensure you have:</p>
|
| 1460 |
-
<ul
|
| 1461 |
<li>API keys for AI providers in .env file</li>
|
| 1462 |
<li>All Python dependencies installed</li>
|
| 1463 |
<li>Optional: Digi-Key API credentials</li>
|
|
|
|
| 1107 |
max-width: 1200px;
|
| 1108 |
margin: 0 auto;
|
| 1109 |
}
|
| 1110 |
+
|
| 1111 |
.tinkeriq-header {
|
| 1112 |
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 1113 |
padding: 2rem;
|
|
|
|
| 1117 |
margin-bottom: 2rem;
|
| 1118 |
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 1119 |
}
|
| 1120 |
+
|
| 1121 |
.component-card {
|
| 1122 |
background: #f8fafc;
|
| 1123 |
border: 1px solid #e2e8f0;
|
|
|
|
| 1126 |
margin: 0.5rem 0;
|
| 1127 |
transition: all 0.2s ease;
|
| 1128 |
}
|
| 1129 |
+
|
| 1130 |
.component-card:hover {
|
| 1131 |
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
| 1132 |
transform: translateY(-1px);
|
| 1133 |
}
|
| 1134 |
+
|
| 1135 |
.cost-summary {
|
| 1136 |
background: #edf2f7;
|
| 1137 |
border-left: 4px solid #667eea;
|
|
|
|
| 1139 |
margin: 1rem 0;
|
| 1140 |
border-radius: 0 8px 8px 0;
|
| 1141 |
}
|
| 1142 |
+
|
| 1143 |
.tab-nav {
|
| 1144 |
background: #f7fafc;
|
| 1145 |
border-radius: 8px;
|
| 1146 |
padding: 0.5rem;
|
| 1147 |
}
|
| 1148 |
+
|
| 1149 |
.status-success {
|
| 1150 |
color: #38a169;
|
| 1151 |
font-weight: 600;
|
| 1152 |
}
|
| 1153 |
+
|
| 1154 |
.status-error {
|
| 1155 |
color: #e53e3e;
|
| 1156 |
font-weight: 600;
|
| 1157 |
}
|
| 1158 |
+
|
| 1159 |
+
/* Fix for tips box - ensure readable text */
|
| 1160 |
+
.tips-box {
|
| 1161 |
+
background: #f0f9ff !important;
|
| 1162 |
+
border: 1px solid #0ea5e9 !important;
|
| 1163 |
+
border-radius: 8px !important;
|
| 1164 |
+
padding: 1rem !important;
|
| 1165 |
+
margin-top: 1rem !important;
|
| 1166 |
+
color: #0c4a6e !important;
|
| 1167 |
+
}
|
| 1168 |
+
|
| 1169 |
+
.tips-box h4 {
|
| 1170 |
+
color: #0369a1 !important;
|
| 1171 |
+
margin-bottom: 0.5rem !important;
|
| 1172 |
+
font-weight: 600 !important;
|
| 1173 |
+
}
|
| 1174 |
+
|
| 1175 |
+
.tips-box ul {
|
| 1176 |
+
margin: 0.5rem 0 !important;
|
| 1177 |
+
padding-left: 1.5rem !important;
|
| 1178 |
+
color: #0c4a6e !important;
|
| 1179 |
+
}
|
| 1180 |
+
|
| 1181 |
+
.tips-box li {
|
| 1182 |
+
color: #0c4a6e !important;
|
| 1183 |
+
margin-bottom: 0.25rem !important;
|
| 1184 |
+
}
|
| 1185 |
+
|
| 1186 |
+
/* Additional fixes for other info boxes */
|
| 1187 |
+
.info-box {
|
| 1188 |
+
background: #fffbeb !important;
|
| 1189 |
+
border: 1px solid #f59e0b !important;
|
| 1190 |
+
border-radius: 8px !important;
|
| 1191 |
+
padding: 1rem !important;
|
| 1192 |
+
margin-top: 1rem !important;
|
| 1193 |
+
color: #92400e !important;
|
| 1194 |
+
}
|
| 1195 |
+
|
| 1196 |
+
.info-box h4 {
|
| 1197 |
+
color: #d97706 !important;
|
| 1198 |
+
margin-bottom: 0.5rem !important;
|
| 1199 |
+
font-weight: 600 !important;
|
| 1200 |
+
}
|
| 1201 |
+
|
| 1202 |
+
.info-box ul {
|
| 1203 |
+
margin: 0.5rem 0 !important;
|
| 1204 |
+
padding-left: 1.5rem !important;
|
| 1205 |
+
color: #92400e !important;
|
| 1206 |
+
}
|
| 1207 |
+
|
| 1208 |
+
.info-box li {
|
| 1209 |
+
color: #92400e !important;
|
| 1210 |
+
margin-bottom: 0.25rem !important;
|
| 1211 |
+
}
|
| 1212 |
+
|
| 1213 |
+
.setup-box {
|
| 1214 |
+
background: #f0fdf4 !important;
|
| 1215 |
+
border: 1px solid #22c55e !important;
|
| 1216 |
+
border-radius: 8px !important;
|
| 1217 |
+
padding: 1rem !important;
|
| 1218 |
+
margin-top: 1rem !important;
|
| 1219 |
+
color: #15803d !important;
|
| 1220 |
+
}
|
| 1221 |
+
|
| 1222 |
+
.setup-box h4 {
|
| 1223 |
+
color: #16a34a !important;
|
| 1224 |
+
margin-bottom: 0.5rem !important;
|
| 1225 |
+
font-weight: 600 !important;
|
| 1226 |
+
}
|
| 1227 |
+
|
| 1228 |
+
.setup-box p {
|
| 1229 |
+
color: #15803d !important;
|
| 1230 |
+
margin-bottom: 0.5rem !important;
|
| 1231 |
+
}
|
| 1232 |
+
|
| 1233 |
+
.setup-box ul {
|
| 1234 |
+
margin: 0.5rem 0 !important;
|
| 1235 |
+
padding-left: 1.5rem !important;
|
| 1236 |
+
color: #15803d !important;
|
| 1237 |
+
}
|
| 1238 |
+
|
| 1239 |
+
.setup-box li {
|
| 1240 |
+
color: #15803d !important;
|
| 1241 |
+
margin-bottom: 0.25rem !important;
|
| 1242 |
+
}
|
| 1243 |
"""
|
| 1244 |
|
| 1245 |
with gr.Blocks(css=enhanced_css, title="TinkerIQ - AI Maker Assistant") as app:
|
|
|
|
| 1278 |
)
|
| 1279 |
|
| 1280 |
gr.HTML("""
|
| 1281 |
+
<div class="tips-box">
|
| 1282 |
<h4>💡 Quick Tips:</h4>
|
| 1283 |
+
<ul>
|
| 1284 |
<li>Upload circuit images for analysis</li>
|
| 1285 |
<li>Ask for code generation help</li>
|
| 1286 |
<li>Request BOM creation</li>
|
|
|
|
| 1408 |
)
|
| 1409 |
|
| 1410 |
gr.HTML("""
|
| 1411 |
+
<div class="info-box">
|
| 1412 |
<h4>💡 BOM Features:</h4>
|
| 1413 |
+
<ul>
|
| 1414 |
<li>Auto-generated from circuit analysis</li>
|
| 1415 |
<li>Real-time pricing from suppliers</li>
|
| 1416 |
<li>Multi-format export (CSV, JSON, PDF)</li>
|
|
|
|
| 1539 |
module_status = gr.HTML(value=update_module_status())
|
| 1540 |
|
| 1541 |
gr.HTML("""
|
| 1542 |
+
<div class="setup-box">
|
| 1543 |
<h4>🔧 Environment Setup</h4>
|
| 1544 |
<p>To enable all features, ensure you have:</p>
|
| 1545 |
+
<ul>
|
| 1546 |
<li>API keys for AI providers in .env file</li>
|
| 1547 |
<li>All Python dependencies installed</li>
|
| 1548 |
<li>Optional: Digi-Key API credentials</li>
|