Spaces:
Running
Running
Update static/script.js
Browse files- static/script.js +8 -6
static/script.js
CHANGED
|
@@ -970,9 +970,9 @@ interpretButton.addEventListener('click', async function () {
|
|
| 970 |
if (data.caption) {
|
| 971 |
|
| 972 |
resultContainer.innerHTML = `
|
| 973 |
-
<h3
|
| 974 |
<br>
|
| 975 |
-
<p
|
| 976 |
`;
|
| 977 |
} else if (data.error) {
|
| 978 |
resultContainer.innerHTML = `<p class="error-text">❌ Erreur : ${data.error}</p>`;
|
|
@@ -1098,7 +1098,7 @@ sendBtn.addEventListener("click", async function () {
|
|
| 1098 |
formData.append("question", question);
|
| 1099 |
|
| 1100 |
// Afficher le message de chargement
|
| 1101 |
-
resultContainer.innerHTML = `<p class="placeholder-text">⏳ En attente de la réponse...</p>`;
|
| 1102 |
|
| 1103 |
try {
|
| 1104 |
const response = await fetch("/image-qa/", {
|
|
@@ -1110,9 +1110,11 @@ sendBtn.addEventListener("click", async function () {
|
|
| 1110 |
if (data.answer) {
|
| 1111 |
|
| 1112 |
resultContainer.innerHTML = `
|
| 1113 |
-
|
| 1114 |
-
|
| 1115 |
-
|
|
|
|
|
|
|
| 1116 |
`;
|
| 1117 |
} else {
|
| 1118 |
resultContainer.innerHTML = `<p class="placeholder-text">Erreur : ${data.error}</p>`;
|
|
|
|
| 970 |
if (data.caption) {
|
| 971 |
|
| 972 |
resultContainer.innerHTML = `
|
| 973 |
+
<h3 "text-align: center; font-size: 1.5rem; font-weight: bold; color: black;">📸 Légende générée :</h3>
|
| 974 |
<br>
|
| 975 |
+
<p "text-align: center; font-size: 1.2rem; font-weight: bold; color: black;">${data.caption}</p>
|
| 976 |
`;
|
| 977 |
} else if (data.error) {
|
| 978 |
resultContainer.innerHTML = `<p class="error-text">❌ Erreur : ${data.error}</p>`;
|
|
|
|
| 1098 |
formData.append("question", question);
|
| 1099 |
|
| 1100 |
// Afficher le message de chargement
|
| 1101 |
+
resultContainer.innerHTML = `<p class="placeholder-text" style="text-align: center; color: black; font-weight: bold;">⏳ En attente de la réponse...</p>`;
|
| 1102 |
|
| 1103 |
try {
|
| 1104 |
const response = await fetch("/image-qa/", {
|
|
|
|
| 1110 |
if (data.answer) {
|
| 1111 |
|
| 1112 |
resultContainer.innerHTML = `
|
| 1113 |
+
|
| 1114 |
+
<h3 style="text-align: center; font-size: 1.5rem; font-weight: bold; color: black">🧠 Réponse générée :</h3>
|
| 1115 |
+
<br>
|
| 1116 |
+
<p style="text-align: center; font-size: 1.2rem; font-weight: bold; color: black;">${data.answer}</p>
|
| 1117 |
+
|
| 1118 |
`;
|
| 1119 |
} else {
|
| 1120 |
resultContainer.innerHTML = `<p class="placeholder-text">Erreur : ${data.error}</p>`;
|