@@ -69,6 +69,8 @@ document.getElementById('btnLLMReset').addEventListener('click', function() {
69
69
document . getElementById ( 'inputForm' ) . addEventListener ( 'submit' , function ( event ) {
70
70
event . preventDefault ( ) ; // Prevent the default form submission
71
71
72
+ document . getElementById ( 'loading-spinner' ) . style . display = 'flex' ;
73
+
72
74
const inputData = document . getElementById ( 'inputData' ) . value ;
73
75
const backendType = document . getElementById ( 'backendType' ) . value ;
74
76
const inputLLMurl = document . getElementById ( 'inputLLMurl' ) . value ;
@@ -94,8 +96,10 @@ document.getElementById('inputForm').addEventListener('submit', function(event)
94
96
. then ( text => {
95
97
// Display the response in the textarea
96
98
document . getElementById ( 'responseFieldText' ) . value = JSON . stringify ( text . original_text , null , 2 ) ; // Format the JSON response
97
- document . getElementById ( 'responseFieldEntities' ) . value = JSON . stringify ( text . entities , null , 2 ) ; // Format the JSON response
98
- document . getElementById ( 'responseFieldAnonText' ) . value = JSON . stringify ( text . anonymized_text , null , 2 ) ; // Format the string response
99
+ document . getElementById ( 'responseFieldEntities' ) . value = JSON . stringify ( text . entities , null , 2 ) ;
100
+ document . getElementById ( 'responseFieldAnonText' ) . value = JSON . stringify ( text . anonymized_text , null , 2 ) ;
101
+
102
+ document . getElementById ( 'loading-spinner' ) . style . display = 'none' ;
99
103
} )
100
104
. catch ( ( error ) => {
101
105
console . error ( 'Error:' , error ) ; // Handle any errors
0 commit comments