updates
Browse files- main.py +1 -1
- static/index.html +4 -2
main.py
CHANGED
@@ -125,7 +125,7 @@ def verify_image(fileUpload: UploadFile):
|
|
125 |
]
|
126 |
)
|
127 |
|
128 |
-
result_image = fileUpload.
|
129 |
|
130 |
elif original_media != 'n/a':
|
131 |
original_media_extension = file_extension(original_media)
|
|
|
125 |
]
|
126 |
)
|
127 |
|
128 |
+
result_image = fileUpload.filename
|
129 |
|
130 |
elif original_media != 'n/a':
|
131 |
original_media_extension = file_extension(original_media)
|
static/index.html
CHANGED
@@ -289,6 +289,8 @@
|
|
289 |
spinner = document.querySelector('.display-verify .spinner');
|
290 |
|
291 |
if (placeholder) placeholder.remove();
|
|
|
|
|
292 |
spinner.style.display = "block";
|
293 |
|
294 |
const formData = new FormData(uploadForm);
|
@@ -377,9 +379,9 @@
|
|
377 |
|
378 |
try {
|
379 |
if (placeholder) placeholder.remove();
|
380 |
-
|
381 |
if (document.getElementById("result"))
|
382 |
-
document.getElementById("result").remove();
|
|
|
383 |
spinner.style.display = "block";
|
384 |
|
385 |
const resp = await generateImage(imagePrompt.value, model.value);
|
|
|
289 |
spinner = document.querySelector('.display-verify .spinner');
|
290 |
|
291 |
if (placeholder) placeholder.remove();
|
292 |
+
if (document.getElementById("result"))
|
293 |
+
document.getElementById("result").remove(); // JCL make sure to remove the correct one
|
294 |
spinner.style.display = "block";
|
295 |
|
296 |
const formData = new FormData(uploadForm);
|
|
|
379 |
|
380 |
try {
|
381 |
if (placeholder) placeholder.remove();
|
|
|
382 |
if (document.getElementById("result"))
|
383 |
+
document.getElementById("result").remove(); // JCL make sure to remove the correct one
|
384 |
+
|
385 |
spinner.style.display = "block";
|
386 |
|
387 |
const resp = await generateImage(imagePrompt.value, model.value);
|