Update v2.txt
Browse files
v2.txt
CHANGED
@@ -185,9 +185,15 @@ body {
|
|
185 |
border-bottom: 2px solid var(--primary-color);
|
186 |
padding-bottom: 10px;
|
187 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
.image-upload-container {
|
189 |
border: 2px dashed var(--secondary-color);
|
190 |
-
border-radius: var(--border-radius);
|
191 |
padding: 40px;
|
192 |
text-align: center;
|
193 |
background-color: rgba(75, 181, 67, 0.1);
|
@@ -352,23 +358,20 @@ html_footer = """
|
|
352 |
if (submitBtn) {
|
353 |
submitBtn.addEventListener('click', function() {
|
354 |
showLoading();
|
355 |
-
|
356 |
-
|
|
|
357 |
if (output && output.textContent.trim().length > 0) {
|
358 |
hideLoading();
|
359 |
-
|
360 |
-
|
361 |
-
if (output && output.textContent.trim().length > 0) {
|
362 |
-
hideLoading();
|
363 |
-
clearInterval(checkInterval);
|
364 |
-
}
|
365 |
-
}, 1000);
|
366 |
-
setTimeout(function() {
|
367 |
-
hideLoading();
|
368 |
-
clearInterval(checkInterval);
|
369 |
-
}, 30000);
|
370 |
}
|
371 |
-
},
|
|
|
|
|
|
|
|
|
|
|
372 |
});
|
373 |
}
|
374 |
});
|
@@ -406,7 +409,7 @@ with gr.Blocks(css=custom_css) as app:
|
|
406 |
visible=False
|
407 |
)
|
408 |
|
409 |
-
gr.HTML('<h3 class="section-
|
410 |
with gr.Row():
|
411 |
num_recipes = gr.Slider(
|
412 |
minimum=1,
|
|
|
185 |
border-bottom: 2px solid var(--primary-color);
|
186 |
padding-bottom: 10px;
|
187 |
}
|
188 |
+
.section-header2 {
|
189 |
+
font-size: 1.6em;
|
190 |
+
font-weight: 600;
|
191 |
+
color: var(--text-color);
|
192 |
+
border-bottom: 2px solid var(--primary-color);
|
193 |
+
padding-bottom: 10px;
|
194 |
+
}
|
195 |
.image-upload-container {
|
196 |
border: 2px dashed var(--secondary-color);
|
|
|
197 |
padding: 40px;
|
198 |
text-align: center;
|
199 |
background-color: rgba(75, 181, 67, 0.1);
|
|
|
358 |
if (submitBtn) {
|
359 |
submitBtn.addEventListener('click', function() {
|
360 |
showLoading();
|
361 |
+
const output = document.querySelector('.recipe-output');
|
362 |
+
// Check every second for output content
|
363 |
+
const checkInterval = setInterval(function() {
|
364 |
if (output && output.textContent.trim().length > 0) {
|
365 |
hideLoading();
|
366 |
+
clearInterval(checkInterval);
|
367 |
+
clearTimeout(forceHideTimeout);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
368 |
}
|
369 |
+
}, 60000);
|
370 |
+
// Force hide after 120 seconds
|
371 |
+
const forceHideTimeout = setTimeout(function() {
|
372 |
+
hideLoading();
|
373 |
+
clearInterval(checkInterval);
|
374 |
+
}, 120000); // 120000 milliseconds = 120 seconds
|
375 |
});
|
376 |
}
|
377 |
});
|
|
|
409 |
visible=False
|
410 |
)
|
411 |
|
412 |
+
gr.HTML('<h3 class="section-header2">Recipe Preferences</h3>')
|
413 |
with gr.Row():
|
414 |
num_recipes = gr.Slider(
|
415 |
minimum=1,
|